---
search:
  tags:
    - auth
    - POST
seo:
  description: >-
    Turns two-factor on and returns 10 recovery… Reference for the POST
    /api/v1/auth/two-factor/enrolment/confirm endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Confirm TOTP enrolment
  badge: POST
title: Confirm TOTP enrolment
type: openapi-operation
---
Turns two-factor on and returns 10 recovery codes once. Ends the other sessions of the user and sets a new session cookie. A wrong code keeps the secret pending.

`POST /api/v1/auth/two-factor/enrolment/confirm`

**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"
  ]
}
```
