Skip to content

Document the API key rotate endpoint#413

Merged
masnwilliams merged 1 commit into
mainfrom
hypeship/docs-api-key-rotate
Jun 14, 2026
Merged

Document the API key rotate endpoint#413
masnwilliams merged 1 commit into
mainfrom
hypeship/docs-api-key-rotate

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rewrites the Rotate a key section of the API Keys guide to use the new POST /org/api_keys/{id}/rotate endpoint instead of the manual create-then-delete steps.
  • Documents days_to_expire (new key lifetime; omit to reuse the rotated key's original lifetime) and expire_in_days (grace window before the old key expires; 0 = immediate, default 7 days).
  • Adds TypeScript, Python, and Go examples mirroring the rest of the page, and updates the troubleshooting table for expire_in_days and the new-key-shorter-than-grace 400.

Notes

  • Follows the API change that added the rotate endpoint (kernel/kernel #2411, merged).
  • SDK method names (apiKeys.rotate / api_keys.rotate / APIKeys.Rotate) follow the Stainless rotate method; worth a quick check once the SDKs publish, in case naming differs.

Test plan

  • mintlify dev and 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 rotate API instead of a manual create-then-delete flow. It explains that one call issues a replacement key, copies name and project scope, returns plaintext key once, and keeps the old key valid during a grace period.

days_to_expire and expire_in_days are documented (new key lifetime vs. old key grace window, including 0 for immediate revocation and the default 7-day window). TypeScript, Python, and Go CodeGroup examples were added, post-rotate steps were simplified, and the troubleshooting table now covers expire_in_days validation, the rotate-specific 400 when the new key would expire before the grace window ends, and 404 wording 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.

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.
@mintlify

mintlify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview Jun 14, 2026, 7:16 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@masnwilliams masnwilliams marked this pull request as ready for review June 14, 2026 19:16
@firetiger-agent

Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

PRs in the kernel, infra, hypeman, and hypeship repos. kernel is a ~mono repo with many logical services underneath, ensure to focus on the implicated service for the PR

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 @firetiger monitor this.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@masnwilliams masnwilliams merged commit b3e776f into main Jun 14, 2026
4 checks passed
@masnwilliams masnwilliams deleted the hypeship/docs-api-key-rotate branch June 14, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant