Browse the API reference

Regenerate Recovery Codes

post/v1/auth/mfa/recovery-codes/regenerate

Part of Auth.

Replace the recovery-code set after re-authentication; codes are shown once.

Authentication

Authenticate with:

  • API key in the X-API-Key header.

Request body

Required, application/json.

FieldTypeDescription
passwordoptionalstring

Current password (password-holding users)

assertionoptionalobject

Fresh WebAuthn assertion from the re-auth ceremony

Example request

curl
curl -X POST "https://api.robosystems.ai/v1/auth/mfa/recovery-codes/regenerate" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "password": "string",
  "assertion": {}
}'

Responses

200 Successful Response

FieldTypeDescription
codesrequiredstring[]

Single-use recovery codes

StatusMeaning
400Invalid request
401Re-authentication failed
422Validation Error
429Rate limit exceeded
500Internal server error