---
title: "Confirm a code to enable 2FA — returns one-time backup codes"
method: POST
path: "/api/auth/2fa/enable"
tags: ["Auth"]
---

# Confirm a code to enable 2FA — returns one-time backup codes

`POST /api/auth/2fa/enable`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/auth/2fa/enable`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `hiveship_access`
  - HTTP bearer

## Response `200`

2FA enabled; backup codes returned once

## Other responses

- `400`: No pending setup or invalid code

---

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