1. Docs
  2. API Reference
  3. Regenerate the organization's SSO recovery codes

Regenerate the organization's SSO recovery codes

POST/api/v1/organizations/{id}/policy/sso-recovery-codes

Mints 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 TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-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

  • dataOrganizationSsoRecoveryCodesResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X POST "https://auth.canopy-io.com/api/v1/organizations/value/policy/sso-recovery-codes" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "data": {
    "codes": [
      "string"
    ],
    "generation": 0,
    "remaining": 0
  }
}
Related endpoints
GETList organizations
POSTCreate an organization
DELETEDelete every organization
GETGet an organization
PATCHUpdate an organization
DELETEDelete an organization
GETGet an organization's authentication policy
PATCHUpdate an organization's authentication policy
POSTStart a test sign-in on the organization's connection
GETRead the organization's test sign-in
GETList the organization's domain claims
POSTClaim a domain for the organization
POSTVerify one of the organization's domains
DELETERemove one of the organization's domain claims
GETList an organization's SSO connections
POSTBind an SSO connection to an organization
DELETEUnbind an SSO connection from an organization
GETList an organization's members
POSTAdd a member to an organization
PATCHChange a member's role
DELETERemove a member from an organization
GETList an organization's invitations
POSTInvite a member into an organization
GETList the roles an organization may assign
DELETERevoke an organization invitation
GETGet an organization's SSO connection
POSTSet up an organization's SSO connection
PATCHChange an organization's SSO connection
DELETERemove an organization's SSO connection
POSTActivate an organization's SSO connection
POSTDisable an organization's SSO connection
POSTImport the identity provider's SAML metadata
GETGet the service-provider values for an organization's SSO connection
Was this page helpful?

Tell us how we can improve this guide.