---
title: "Regenerate Api Key"
method: POST
path: "/auth/api-keys/{key_id}/regenerate"
---

# Regenerate Api Key

`POST /auth/api-keys/{key_id}/regenerate`

## Request

- Base URL: `https://api.n0brains.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.n0brains.com/auth/api-keys/{key_id}/regenerate`
- Auth: none declared

Rotate an API key: create a fresh key, then revoke the old one.

Create-before-revoke so a failure never leaves the account keyless. Net key
count is unchanged, so this is safe even when it's the user's only key.

## Path parameters

- `key_id` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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