Document the API key rotate endpoint#413
Conversation
Replace the manual create-then-delete rotation steps with the rotate endpoint, covering days_to_expire, the expire_in_days grace window, and the related troubleshooting cases.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: This PR only documents an existing API endpoint without making changes to any of the four monitored repos (kernel, infra, hypeman, hypeship); it appears to be documentation-only work that doesn't require deploy monitoring. To monitor this PR anyway, reply with |
There was a problem hiding this comment.
Risk assessment: Very Low
Evidence from the diff: this PR modifies only info/api-keys.mdx, adding documentation text, SDK examples, and troubleshooting rows for the API key rotate endpoint. It doesn't change runtime code, site configuration, navigation, infrastructure, permissions, auth behavior, or generated API schemas.
I found no existing approvals and no CODEOWNERS file in the workspace, so this is safe to approve under the provided criteria.
Sent by Cursor Automation: Assign PR reviewers


Summary
POST /org/api_keys/{id}/rotateendpoint instead of the manual create-then-delete steps.days_to_expire(new key lifetime; omit to reuse the rotated key's original lifetime) andexpire_in_days(grace window before the old key expires;0= immediate, default 7 days).expire_in_daysand the new-key-shorter-than-grace 400.Notes
apiKeys.rotate/api_keys.rotate/APIKeys.Rotate) follow the Stainlessrotatemethod; worth a quick check once the SDKs publish, in case naming differs.Test plan
mintlify devand confirm the API Keys page renders with the new section and code tabs.Note
Low Risk
Documentation-only changes to the API Keys guide with no runtime or credential-handling code.
Overview
The Rotate a key section now describes the
rotateAPI instead of a manual create-then-delete flow. It explains that one call issues a replacement key, copies name and project scope, returns plaintextkeyonce, and keeps the old key valid during a grace period.days_to_expireandexpire_in_daysare documented (new key lifetime vs. old key grace window, including0for immediate revocation and the default 7-day window). TypeScript, Python, and GoCodeGroupexamples were added, post-rotate steps were simplified, and the troubleshooting table now coversexpire_in_daysvalidation, the rotate-specific 400 when the new key would expire before the grace window ends, and404wording for missing keys and project-scoped rotate limits.Reviewed by Cursor Bugbot for commit 972a7f7. Bugbot is set up for automated code reviews on this repo. Configure here.