logo
MFARegenerate backup codes
MFA

Regenerate backup codes

Same trust bar as disable — invalidates all previous backup codes.

curl -X POST "//api/auth/mfa/backup/regenerate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (API token)" \
  -d '{
  "code": "example_string",
  "password": "example_string"
}'
{
  "backup_codes": [
    "example_string"
  ]
}
POST
/api/auth/mfa/backup/regenerate
POST
API Key (cookie: slugbase.sid)
slugbase.sidstring
Required

Session cookie after login

Session cookie after login
Bearer Token (API token)
Bearer Tokenstring
Required

Bearer token (API token) - just enter the token, "Bearer" prefix will be added automatically

Content-Typestring
Required

The media type of the request body

Options: application/json
codestring
Required

TOTP or unused backup code

passwordstring

Required when the user has a local password (omit for OIDC-only)

Request Preview
Response

Response will appear here after sending the request

Authentication

path
parameterstring
Required

API Key for authentication. Session cookie after login

header
Authorizationstring
Required

Bearer token (API token). Authentication token required.

Body

application/json
codestring
Required

TOTP or unused backup code

passwordstring

Required when the user has a local password (omit for OIDC-only)

Responses

backup_codesstring[]
Required

One-time codes; shown once