---
title: "Enable2 F A"
method: POST
path: "/api/user/2fa/enable"
tags: ["2FA"]
---

# Enable2 F A

`POST /api/user/2fa/enable`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/api/user/2fa/enable`
- Auth: one of:
  - API key in header `Authorization` and API key in header `New-Api-User`
  - API key in header `New-Api-User` and API key in cookie `session`

## Request body

- Verify2FARequest: Verify2FARequest schema
  - `code` string, required
  - `flow_token` string

## Response `200`

OK

- ResponseDtoAuthRotationData: Response_dto.AuthRotationData schema
  - `data` AuthRotationData, required
    - `access_expires_at` integer
    - `access_token` string
    - `session` LoginSessionView
      - `created_at` integer, required
      - `current` boolean, required
      - `expires_at` integer, required
      - `ip` string, required
      - `last_active_at` integer, required
      - `login_method` string, required
      - `sid` string, required
      - `user_agent` string, required
    - `token_type` string
  - `message` string, required
  - `success` boolean, required

## Changes

- **2026-10-15** `6cb670e861f5`: 2 breaking, 2 warning, 10 info
  - added required request body
  - the `data` response's property type changed from no type to `object` for status `200` (media type: application/json)
  - removed the optional property `object` from the response with the `200` status (media type: application/json)
  - removed the optional property `object` from the response with the `200` status (media type: application/xml)
  - …10 more

[Operation history](https://skmtc.dev/unorouter/apis/new-api/changes/api/user/2fa/enable/post.md)

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
