---
title: "Replace the API secret; the old key stops working immediately"
method: POST
path: "/keys/rotate"
---

# Replace the API secret; the old key stops working immediately

`POST /keys/rotate`

## Request

- Base URL: `https://api.justcaptions.com/v1`
- URL: `https://api.justcaptions.com/v1/keys/rotate`
- Auth: HTTP bearer

## Response `200`

Success

- object

## Other responses

- `400`: invalid_request
- `401`: invalid_api_key
- `402`: insufficient_credits (prepaid balance or monthly cap), or payment_required (legacy subscription)
- `429`: quota_exceeded, free_tier_busy, spend_cap_reached or rate_limited
- `503`: Provider or service unavailable

---

[API](https://skmtc.dev/justcaptions/apis/just-captions-api.md) · [All operations](https://skmtc.dev/justcaptions/apis/just-captions-api/llms.txt) · [OpenAPI document](https://skmtc.dev/justcaptions/apis/just-captions-api/revisions/bbd6b38c1cef?raw)
