---
search:
  tags:
    - auth
    - POST
seo:
  description: >-
    Needs a current code. The old codes stop working. Reference for the POST
    /api/v1/auth/two-factor/recovery-codes endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Replace your recovery codes
  badge: POST
title: Replace your recovery codes
type: openapi-operation
---
Needs a current code. The old codes stop working.

`POST /api/v1/auth/two-factor/recovery-codes`

**Request body** (`application/json`, required)

- `code` (string) — The 6-digit code of the authenticator app

Request body example:

```json
{
  "code": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "recovery_codes": [
    "string"
  ]
}
```
