---
title: "Rotate the presented key"
method: POST
path: "/api/v1/keys/rotate"
tags: ["keys"]
---

# Rotate the presented key

`POST /api/v1/keys/rotate`

## Request

- Base URL: `https://worthune.com`
- URL: `https://worthune.com/api/v1/keys/rotate`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

The presented key rotates ITSELF: same org, plan and role, new credential; the old plaintext stops working immediately. The new key is shown once. 5/hour per key.

## Response `200`

The new key.

- object
  - `ok` unknown, required
  - `key` string, required
  - `note` string, required

## Other responses

- `401`: No key presented (Authorization: Bearer wk_… or X-Api-Key).
- `402`: Unrecognized or revoked key — a revoked subscription gets a new subscription, not a rotation.
- `429`: Hourly per-org stateful quota, a per-route durable limit, or the 120 requests/minute per-IP burst backstop.

---

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