---
title: "8 new recovery codes with a current code, shown once; the old ones stop working (p19,"
method: POST
path: "/auth/two-step/recovery-codes"
tags: ["Auth"]
---

# 8 new recovery codes with a current code, shown once; the old ones stop working (p19,

`POST /auth/two-step/recovery-codes`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/auth/two-step/recovery-codes`
- Auth: HTTP bearer

Needs the signed-in person (no API key) and a current authenticator code not used before (422 TWO_STEP_CODE_WRONG otherwise, counted on the account lock). 409 TWO_STEP_NOT_ON when two-step is off. Stored only as SHA-256 hashes. Behind the two-step rate limit.

## Request body

- object
  - `code` string, required

## Response `200`

The new recovery codes

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

## Other responses

- `401`: Authentication required
- `409`: Request conflicts with the durable onboarding state
- `422`: Request failed validation
- `503`: Required sandbox provider configuration or service is unavailable

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/auth/two-step/recovery-codes/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
