Regenerate TOTP backup codes.
POST
/api/account/totp/backup-codes/regenerate
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/account/totp/backup-codes/regenerate \ --header 'Content-Type: application/json' \ --cookie authrim_session=<authrim_session> \ --data '{ "code": "example" }'Invalidates existing backup codes and returns a new one-time set. Recent TOTP or passkey reauthentication is required.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ” Media type application/json
object
code
string
Example generated
{ "code": "example"}Responses
Section titled “ Responses ”Account Page TOTP backup-code regeneration response.
Media type application/json
object
ok
required
boolean
backup_codes
required
Array<string>
Example generated
{ "ok": true, "backup_codes": [ "example" ]}Error response.
Media type application/json
object
error
string
message
string
error_description
string
error_code
Stable Authrim error category that can be provided to support.
string
error_id
Opaque occurrence identifier that can be provided to support for correlation.
string format: uuid
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example", "error_code": "example", "error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
error_code
Stable Authrim error category that can be provided to support.
string
error_id
Opaque occurrence identifier that can be provided to support for correlation.
string format: uuid
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example", "error_code": "example", "error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
error_code
Stable Authrim error category that can be provided to support.
string
error_id
Opaque occurrence identifier that can be provided to support for correlation.
string format: uuid
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example", "error_code": "example", "error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}