API Reference
The API behind the in-site editor: sessions, shared drafts, page management, publishing, and AI generation.
The API behind the in-site editor: sessions, shared drafts, page management, publishing, and AI generation. Every route lives on the same origin as the docs site and authenticates with the sealed docsdev_admin session cookie set at sign-in.
Auth
Sign in with a PIN or GitHub, inspect the session, sign out.
Sign in with a PIN
Exchanges the team PIN for a sealed session cookie.
Sign in with GitHub
Starts the GitHub App OAuth flow.
Inspect the current session
Sign out
Clears the session cookie.
Drafts
Shared drafts visible to every editor, with a last-writer conflict guard.
Read a draft, or list all drafts
With slug, returns that page's shared draft (or null).
Delete a draft
Save a draft
Saves the shared draft for a page.
Pages
List and delete documentation pages.
List published pages
Slugs of every built documentation page.
Delete a page
Clears the page's shared draft, and — if the page is published — commits the removal of its MDX file to GitHub.
Publish
Commit a page (and its uploaded assets) to GitHub.
AI
Workers AI documentation writing and image generation.