v51

OpenAPI 3.1.0raw.githubusercontent.com2026-08-018486293.2 KB
keys

Rotate Key

Rotate an API key's secret in place.

Requires master key authentication.

Generates a new secret for the same key row (id, user, name, expiry, and metadata are preserved) and returns the new raw key once, using the same response shape as key creation. The previous secret stops authenticating immediately; there is no grace window.

post/v1/keys/{key_id}/rotate

Path parameters

key_idstring required

Response

Successful Response

allowed_modelsstring[] nullable required
created_atstring required
exclude_from_budgetboolean required
expires_atstring nullable required
idstring required
is_activeboolean required
keystring required
key_namestring nullable required
key_prefixstring nullable required
metadataobject required
user_idstring nullable required