---
title: "Regenerate MFA recovery codes"
method: POST
path: "/auth/mfa/recovery-codes/regenerate"
tags: ["Auth"]
---

# Regenerate MFA recovery codes

`POST /auth/mfa/recovery-codes/regenerate`

## Request

- Base URL: `http://localhost:3200`
- URL: `http://localhost:3200/auth/mfa/recovery-codes/regenerate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/steward-fi/apis/steward-api/docs/auth/mfa/recovery-codes/regenerate/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires an authenticated user session plus a valid current TOTP code. Returns replacement recovery codes exactly once, writes audit events, and dispatches a non-secret recovery-setup webhook.

## Headers

- `X-Steward-Request-Timestamp` string
- `X-Steward-Request-Expires-At` string
- `X-Steward-Signature` string
- `X-Steward-Signing-Key-Id` string
- `Idempotency-Key` string

## Request body

- object
  - `code` string, required

## Response `200`

JSON response

- object
  - `ok` true, required
  - `data` object, required
    - `recoveryCodes` string[], required

## Other responses

- `400`: JSON response
- `401`: JSON response
- `403`: JSON response
- `404`: JSON response
- `408`: JSON response
- `409`: JSON response
- `429`: JSON response

## Changes

- **2026-08-17** `261a7c8070b2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/steward-fi/apis/steward-api/changes/auth/mfa/recovery-codes/regenerate/post.md)

---

[API](https://skmtc.dev/steward-fi/apis/steward-api.md) - [All operations](https://skmtc.dev/steward-fi/apis/steward-api/llms.txt) - [OpenAPI document](https://skmtc.dev/steward-fi/apis/steward-api/revisions/b88b4b97a664?raw)
