---
title: "Setup 2Fa"
method: POST
path: "/auth/2fa/setup"
tags: ["internal"]
---

# Setup 2Fa

`POST /auth/2fa/setup`

## Request

- Base URL: `https://api.companydata.dk` (the document declares no server; this is the origin it was published from)
- URL: `https://api.companydata.dk/auth/2fa/setup`
- Auth: HTTP bearer

Start 2FA setup.

Returns a secret, QR code, and URI for authenticator apps.
The user must verify with a code before 2FA is enabled.

## Response `200`

Successful Response

- TwoFactorSetupResponse: Response with 2FA setup details.
  - `secret` string, required
  - `uri` string, required
  - `qr_code` string, required

---

[API](https://skmtc.dev/companydata/apis/companydata-dk-api.md) · [All operations](https://skmtc.dev/companydata/apis/companydata-dk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/companydata/apis/companydata-dk-api/revisions/1cc6c361ae64?raw)
