---
title: "Re-issue backup codes (invalidates the old set)"
method: POST
path: "/api/auth/2fa/backup-codes/regenerate"
tags: ["Auth"]
---

# Re-issue backup codes (invalidates the old set)

`POST /api/auth/2fa/backup-codes/regenerate`

## Request

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

## Response `200`

New backup codes returned once

## Other responses

- `400`: 2FA not enabled 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)
