---
title: "Issue recovery codes"
method: POST
path: "/accounts/recovery-codes"
tags: ["Multi-Factor Authentication"]
---

# Issue recovery codes

`POST /accounts/recovery-codes`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/recovery-codes`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/recovery-codes/post.ts> (a function with typed inputs; its response is checked against the schema)

Generates new recovery codes for a user

## Request body

- object
  - `email` string, email: User email (optional, defaults to current user)

## Response `200`

Recovery codes issued successfully

- object
  - `data` string[], required

## Other responses

- `400`: Bad request
- `401`: Unauthorized

## Changes

- **2025-06-12** `4979dfd00eda`: 1 breaking, 1 info
  - the response's body type changed from `array` to `object` for status `200`
  - added the required property `data` to the response with the `200` status

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/recovery-codes/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
