Skip to content
LogoLogo

Replace the account's recovery codes

Replace the account's recovery codes

POST/api/v1/auth/mfa/recovery-codes/regenerate

Issues a fresh set of ten codes and invalidates every previous one, including any still unused. Like the original set, they are shown exactly once.

The current password is required, because the codes this returns are themselves a way past the second factor. An account with no confirmed factor receives 409 mfa_not_enabled.

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Request Body

application/json
current_passwordRequired
string <password>·min 1·max 128

Responses