---
title: "Rotate Api Key"
method: POST
path: "/v1/auth/api-keys/{key_id}/rotate"
tags: ["auth"]
---

# Rotate Api Key

`POST /v1/auth/api-keys/{key_id}/rotate`

## Request

- Base URL: `https://api.claims.zicron.ai`
- URL: `https://api.claims.zicron.ai/v1/auth/api-keys/{key_id}/rotate`
- Auth: none declared

Rotate an API key. Creates a new key and puts the old one into a grace period.

# legacy: api_keys.manage@1 (action rotate) does the same (web-caps slice 14).

## Path parameters

- `key_id` string, required

## Request body

- RotateApiKeyRequest
  - `grace_period_hours` integer

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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