---
title: "Rotate this tenant's API key"
method: POST
path: "/v1/api-key/rotate"
---

# Rotate this tenant's API key

`POST /v1/api-key/rotate`

## Request

- Base URL: `https://api.klanexai.com`
- URL: `https://api.klanexai.com/v1/api-key/rotate`
- Auth: API key in header `X-API-Key`

Mints a new API key and immediately invalidates the current one. Authenticate with the current key; the response is the only place the new raw key is returned (only its SHA-256 is stored).

## Response `200`

A new API key. Store it now — it is shown only once.

- object
  - `tenant_id` string
  - `api_key` string

## Other responses

- `401`: Missing or invalid X-API-Key.
- `429`: Per-tenant rate limit exceeded; retry after Retry-After seconds.

---

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