keys
Rotate Api Key
Issue a new key with the same tier/email, then retire the old one.
Used by the portal's "rotate" action. The new key inherits the old key's label with a _rotated suffix, the same tier, and the same user_email so it appears in the same scoped list. The plaintext key is returned exactly once — same contract as POST /v1/keys.
Old-key retirement (task #618): with no body (or grace_period_hours = 0) the old key is revoked immediately — the historical contract. A positive grace_period_hours instead sets expires_at on the old key so both keys overlap for that window, letting integrations swap credentials without a hard cut.
post/v1/keys/{key_id}/rotate
Request
- Base URL: https://api.ctindex.io
- URL: https://api.ctindex.io/v1/keys/{key_id}/rotate
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Path parameters
key_idstring uuid required
Cookies
ctix_sessionstring nullable
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.