---
title: "Enable two-factor authentication"
method: POST
path: "/auth/2fa/enable"
tags: ["auth"]
---

# Enable two-factor authentication

`POST /auth/2fa/enable`

## Response `201`

Two-factor authentication enabled successfully

- object
  - `status` string
  - `message` string
  - `statusCode` integer
  - `data` object
    - `secret` string
    - `qr_code` string

## Other responses

- `400` — Invalid input

## Changes

- **2024-08-08** `49adb8f56ee4` — 1 breaking, 2 info
  - removed the request body
  - added the non-success response with the status `400`
  - added the success response with the status `201`
- **2024-08-08** `b7ae020e7408` — 1 info
  - endpoint added
- **2024-08-07** `06cecc2ac126` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/changes/auth/2fa/enable/post.md)

---

[API](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger.md) · [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hngprojects/kimiko-golang-swagger/revisions/2d1d3ed96bb9/schema)
