---
title: "POST /accounts/2fa/recovery-codes/regenerate/"
method: POST
path: "/accounts/2fa/recovery-codes/regenerate/"
tags: ["accounts"]
---

# POST /accounts/2fa/recovery-codes/regenerate/

`POST /accounts/2fa/recovery-codes/regenerate/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/accounts/2fa/recovery-codes/regenerate/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

POST /accounts/2fa/recovery-codes/regenerate/ - Generate new codes.

## Request body

- RecoveryCodesRegenerate
  - `code` string
  - `password` string

## Response `200`

OK

- RecoveryCodesRegenerateResponse
  - `recovery_codes` string[], required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
