Home / Developers / API reference / refresh-token-policy
refresh-token-policy
Get refresh-token policy
GET /v1/organizations/{organizationId}/refresh-token-policy
Organization refresh-token policy (spec §8.5). Without a stored policy the defaults apply (offline access disabled, 12 h absolute lifetime, 1 h idle timeout).
- Operation ID
getRefreshTokenPolicy- Authentication
- bearerAuth
- Authorization operation
refresh_policy.read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | path | string (uuid) | required |
Request body
No request body.
Responses
200 OK
Headers: X-Correlation-ID (Server-generated request correlation ID (req_<uuid>).)
application/json
| Field | Type | Required | Description |
|---|---|---|---|
organization_id | string (uuid) | optional | |
configured | boolean | optional | |
policy_version | integer | optional | |
offline_access_enabled | boolean | optional | offline_access is disabled by default and requires this explicit organization policy (spec §8.5). |
max_lifetime_seconds | integer | optional | Absolute maximum lifetime of a refresh-token family (default 43200 = 12 h).
|
idle_timeout_seconds | integer | optional | Idle timeout of a refresh-token family (default 3600 = 1 h; never above max_lifetime_seconds).
|
updated_by | string | null | optional | |
updated_at | string | null (date-time) | optional |
Error responses
| Status | Description | Error codes | Body |
|---|---|---|---|
| 400 | Malformed request | invalid_request, invalid_url, secret_ref_not_bound | Error |
| 401 | Unauthenticated, step-up required (RFC 9470 challenge in WWW-Authenticate) or invalid portal link | unauthenticated, insufficient_user_authentication, portal_link_invalid | Error |
| 403 | Operation not permitted for this caller | forbidden, step_up_required, passkey_enrollment_required, passkey_identity_mismatch, dpop_production_environment_only, client_identity_required, workforce_identity_required, break_glass_not_permitted, elevation_invalid, elevation_expired, elevation_self_approval, impersonation_forbidden, impersonation_not_consented, impersonation_self_consent, explicit_consent_required, ticket_consent_invalid, ticket_consent_expired, ticket_consent_ended, ticket_consent_forbidden, recovery_self_approval, recovery_method_not_allowed, recovery_channel_not_allowed, approver_not_permitted, approver_is_requester, self_approval_forbidden | Error |
| 404 | Not found (or outside the caller's scope) | not_found, correlation_policy_missing | Error |
| 429 | Rate limited | rate_limited | Error |
| 500 | Internal error (no detail leaked) | internal_error | Error |
| 503 | Dependency unavailable (fail closed) | engine_unavailable, egress_unavailable, temporarily_unavailable | Error |
Put refresh-token policy
PUT /v1/organizations/{organizationId}/refresh-token-policy
Sensitive (step-up), dual-controllable and audited. Enabling offline access or lengthening a bound needs a present human with step-up. The issuance gate applies the policy on every grant; the organization's clients are re-projected.
- Operation ID
putRefreshTokenPolicy- Authentication
- bearerAuth
- Authorization operation
refresh_policy.write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | path | string (uuid) | required | |
Idempotency-Key | header | string | optional | Replays of the same key and request return the stored response (Idempotent-Replayed: true); the same key with a different request → 422 idempotency_key_reused.
|
Request body
Required.
application/json
| Field | Type | Required | Description |
|---|---|---|---|
offline_access_enabled | boolean | required | |
max_lifetime_seconds | integer | null | optional |
|
idle_timeout_seconds | integer | null | optional |
|
expected_version | integer | null | optional |
Responses
200 OK
Headers: X-Correlation-ID (Server-generated request correlation ID (req_<uuid>).); Idempotent-Replayed (true when the response is a stored idempotent replay.)
application/json
| Field | Type | Required | Description |
|---|---|---|---|
organization_id | string (uuid) | optional | |
configured | boolean | optional | |
policy_version | integer | optional | |
offline_access_enabled | boolean | optional | offline_access is disabled by default and requires this explicit organization policy (spec §8.5). |
max_lifetime_seconds | integer | optional | Absolute maximum lifetime of a refresh-token family (default 43200 = 12 h).
|
idle_timeout_seconds | integer | optional | Idle timeout of a refresh-token family (default 3600 = 1 h; never above max_lifetime_seconds).
|
updated_by | string | null | optional | |
updated_at | string | null (date-time) | optional |
Error responses
| Status | Description | Error codes | Body |
|---|---|---|---|
| 400 | Malformed request | invalid_request, invalid_url, secret_ref_not_bound | Error |
| 401 | Unauthenticated, step-up required (RFC 9470 challenge in WWW-Authenticate) or invalid portal link | unauthenticated, insufficient_user_authentication, portal_link_invalid | Error |
| 403 | Operation not permitted for this caller | forbidden, step_up_required, passkey_enrollment_required, passkey_identity_mismatch, dpop_production_environment_only, client_identity_required, workforce_identity_required, break_glass_not_permitted, elevation_invalid, elevation_expired, elevation_self_approval, impersonation_forbidden, impersonation_not_consented, impersonation_self_consent, explicit_consent_required, ticket_consent_invalid, ticket_consent_expired, ticket_consent_ended, ticket_consent_forbidden, recovery_self_approval, recovery_method_not_allowed, recovery_channel_not_allowed, approver_not_permitted, approver_is_requester, self_approval_forbidden | Error |
| 404 | Not found (or outside the caller's scope) | not_found, correlation_policy_missing | Error |
| 409 | Conflict with current state | conflict, invalid_state_transition, stale_config_version, connection_not_validated, correlation_policy_missing, ambiguous_acknowledgment_required, too_many_credentials, trusted_certificate_limit, domain_conflict, policy_version_conflict, invalid_configuration, agents_disabled, inactive_principal_or_grant, elevation_expired, recovery_expired, impersonation_consent_expired, impersonation_consent_revoked, ticket_consent_ended, change_already_decided, change_expired, owner_exists, no_verified_owner, promotion_stale | Error |
| 413 | Request body too large | payload_too_large | Error |
| 422 | Semantically invalid request | invalid_request, invalid_url, dpop_confidential_only, invalid_configuration, idempotency_key_reused, certificate_rejected, protocol_mismatch, jwks_unusable, agent_policy_invalid, assurance_policy_invalid, passwordless_policy_invalid, attenuation_violation, unverified_source, domain_not_verified, invitation_invalid, overlap_unsupported, registration_denied | Error |
| 429 | Rate limited | rate_limited | Error |
| 500 | Internal error (no detail leaked) | internal_error | Error |
| 503 | Dependency unavailable (fail closed) | engine_unavailable, egress_unavailable, temporarily_unavailable | Error |