Security policy

Base URL: $BUSINESS_API

The object

enforce_2faboolean · optional
idle_timeout_minutesinteger · optional

0 turns the idle timeout off

allowed_ip_rangesarray of string · optional
enforce_ip_on_platform_staffboolean · optional
updated_atstring (date-time) · optional
updated_bystring · optional
client_ipstring · optional

The client address the server sees

The object
{
  "enforce_2fa": true,
  "idle_timeout_minutes": 1,
  "allowed_ip_ranges": [
    "allowed ip range"
  ],
  "enforce_ip_on_platform_staff": true,
  "updated_at": "2026-11-19T09:30:00Z",
  "updated_by": "updated by",
  "client_ip": "client ip"
}

Get the tenant security policy

Logs

GET /security-policy

Returns the tenant's sign-in security policy: whether two-factor authentication is required, whether a step-up is required when switching context, the idle session timeout, the allowed IP ranges and whether the IP list also applies to platform staff. The response also includes client_ip, the address the server sees for this request, so you can check an allowlist before saving it. Requires the business security read permission.

Returns

200 Get the tenant security policy

Show attributes
enforce_2faboolean · optional
idle_timeout_minutesinteger · optional

0 turns the idle timeout off

allowed_ip_rangesarray of string · optional
enforce_ip_on_platform_staffboolean · optional
updated_atstring (date-time) · optional
updated_bystring · optional
client_ipstring · optional

The client address the server sees

Errors 400 · 401

Permissions business:security:read · Roles: admin, owner

curl -X GET "$BUSINESS_API/security-policy" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "enforce_2fa": true,
  "idle_timeout_minutes": 1,
  "allowed_ip_ranges": [
    "allowed ip range"
  ],
  "enforce_ip_on_platform_staff": true,
  "updated_at": "2026-11-19T09:30:00Z",
  "updated_by": "updated by",
  "client_ip": "client ip"
}

Replace the tenant security policy

Logs

PUT /security-policy

Replaces the tenant's whole security policy and returns it; omitted fields take their zero value. idle_timeout_minutes must be 0 (no idle timeout) or between 5 and 10080, and allowed_ip_ranges takes up to 200 CIDR ranges or bare addresses, which are stored as single-host ranges. If the ranges would exclude the caller's current address the call returns 409 unless confirm_lockout is true. Each save is written to the audit trail. Needs a person's session: API keys are refused with 403 and code api_key_not_allowed, whatever scopes they hold.

Body application/json

enforce_2faboolean · optional
idle_timeout_minutesinteger · optional
allowed_ip_rangesarray of string · optional
enforce_ip_on_platform_staffboolean · optional
confirm_lockoutboolean · optional

Save a policy that excludes the caller's current address

Returns

200 Replace the tenant security policy

Show attributes
enforce_2faboolean · optional
idle_timeout_minutesinteger · optional

0 turns the idle timeout off

allowed_ip_rangesarray of string · optional
enforce_ip_on_platform_staffboolean · optional
updated_atstring (date-time) · optional
updated_bystring · optional
client_ipstring · optional

The client address the server sees

Errors 400 · 401 · 409

Permissions business:security:manage · Roles: admin, owner

curl -X PUT "$BUSINESS_API/security-policy" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "enforce_2fa": true,
  "idle_timeout_minutes": 1,
  "allowed_ip_ranges": [
    "allowed ip range"
  ],
  "enforce_ip_on_platform_staff": true,
  "confirm_lockout": true
}'
Response 200
{
  "enforce_2fa": true,
  "idle_timeout_minutes": 1,
  "allowed_ip_ranges": [
    "allowed ip range"
  ],
  "enforce_ip_on_platform_staff": true,
  "updated_at": "2026-11-19T09:30:00Z",
  "updated_by": "updated by",
  "client_ip": "client ip"
}