Regenerate Recovery Codes
post
/v1/auth/mfa/recovery-codes/regeneratePart of Auth.
Replace the recovery-code set after re-authentication; codes are shown once.
Authentication
Authenticate with:
- API key in the
X-API-Keyheader.
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
passwordoptional | string | Current password (password-holding users) |
assertionoptional | object | 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
| Field | Type | Description |
|---|---|---|
codesrequired | string[] | Single-use recovery codes |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Re-authentication failed |
| 422 | Validation Error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |