PT EN

Política de segurança

URL base: $BUSINESS_API

O objecto

enforce_2faboolean · opcional
idle_timeout_minutesinteger · opcional

0 turns the idle timeout off

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

The client address the server sees

O objecto
{
  "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"
}

Obter a política de segurança

Registos

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.

Devolve

200 Get the tenant security policy

Mostrar atributos
enforce_2faboolean · opcional
idle_timeout_minutesinteger · opcional

0 turns the idle timeout off

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

The client address the server sees

Erros 400 · 401

Permissões business:security:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/security-policy" \
  -H "Authorization: Bearer sk_test_..."
Resposta 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"
}

Substituir a política de segurança

Registos

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.

Corpo application/json

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

Save a policy that excludes the caller's current address

Devolve

200 Replace the tenant security policy

Mostrar atributos
enforce_2faboolean · opcional
idle_timeout_minutesinteger · opcional

0 turns the idle timeout off

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

The client address the server sees

Erros 400 · 401 · 409

Permissões business:security:manage · Funções: 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
}'
Resposta 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"
}