---
title: "Confirm the code and switch the factor on"
method: POST
path: "/v1/auth/2fa/enable"
tags: ["Auth"]
---

# Confirm the code and switch the factor on

`POST /v1/auth/2fa/enable`

## Request

- Base URL: `https://api.briefgate.dev`
- URL: `https://api.briefgate.dev/v1/auth/2fa/enable`
- Auth: HTTP bearer

Returns ten single-use recovery codes. They are shown once and stored only as hashes.

## Request body

- object
  - `code` string, required

## Response `200`

Enabled

- object
  - `enabled` boolean
  - `recovery_codes` string[]
  - `warning` string

## Other responses

- `401`: The code is not valid
- `409`: Already enabled
- `422`: Validation error — the body shape is correct but values are invalid

---

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