---
title: "Start TOTP enrollment for the current user"
method: POST
path: "/auth/security/totp/setup"
tags: ["Auth"]
---

# Start TOTP enrollment for the current user

`POST /auth/security/totp/setup`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/auth/security/totp/setup`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Request body

- SetupTOTPInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `current_password` string, required: Current password for re-authentication
  - `reauth_grant` string: One-time action-bound reauthentication grant

## Response `200`

OK

- SetupTOTPOutputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `challenge_id` string, required
  - `manual_entry_key` string, required
  - `otpauth_url` string, required
  - `qr_code_data_url` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
