---
title: "Mfa Regenerate Recovery Codes"
method: POST
path: "/api/auth/mfa/recovery_codes/regenerate"
tags: ["Authentication"]
---

# Mfa Regenerate Recovery Codes

`POST /api/auth/mfa/recovery_codes/regenerate`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/auth/mfa/recovery_codes/regenerate`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)

Replace the user's recovery codes with a fresh set. Old codes are
invalidated. `password` is optional for the same SSO-only-user reason as
/mfa/disable: a user without a stored password is authenticated by their
active session plus the MFA code.

## Request body

- BodyMfaRegenerateRecoveryCodesApiAuthMfaRecoveryCodesRegeneratePost
  - `code` string, required
  - `password` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
