---
search:
  tags:
    - auth
    - POST
seo:
  description: >-
    Returns a new secret. It is not active until the user… Reference for the
    POST /api/v1/auth/two-factor/enrolment endpoint in the TimescaleDB
    Enterprise API.
sidebar:
  label: Start TOTP enrolment
  badge: POST
title: Start TOTP enrolment
type: openapi-operation
---
Returns a new secret. It is not active until the user confirms it with a code. A new start replaces a pending secret.

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

**Responses**

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

Response example, 200:

```json
{
  "otpauth_uri": "string",
  "qr_code": "string",
  "secret": "string"
}
```
