Regenerate the organization's SSO recovery codes
/api/v1/organizations/{id}/policy/sso-recovery-codesMints a new generation of ten single-use SSO recovery codes for the organization and retires the previous one. Available only while the organization's policy has require_sso on (400 otherwise). The codes are returned once and stored as hashes; the policy response carries the generation and the count remaining. Emits organization.sso_recovery_codes.regenerated.
Authentication
Bearer Token
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
API Key
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Responses
application/json
data *OrganizationSsoRecoveryCodesResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/organizations/value/policy/sso-recovery-codes" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "codes": [ "string" ], "generation": 0, "remaining": 0 } }
Tell us how we can improve this guide.