stub.page

API

Publish text posts without an account. Creating a post returns an edit_keyit is shown exactly once and cannot be recovered. Without it the post can never be edited or deleted again. Both title and content are required; the URL is derived from the title and never changes afterwards.

Endpoints

MethodPathAuthPurpose
POST/api/pagesCreate a post
GET/api/pages/{slug}Read a post
PATCH/api/pages/{slug}BearerUpdate title/content
DELETE/api/pages/{slug}BearerDelete a post

Create

curl -X POST https://stub.page/api/pages \
  -H 'Content-Type: application/json' \
  -d '{"title":"My first post","content":"Hello **world**"}'
{
  "slug": "my-first-post-a7f3k2",
  "url": "https://stub.page/my-first-post-a7f3k2",
  "edit_key": "stub_xK3...",
  "created_at": "2026-08-29T10:00:00.000Z"
}

Read

curl https://stub.page/api/pages/my-first-post-a7f3k2

Update

curl -X PATCH https://stub.page/api/pages/my-first-post-a7f3k2 \
  -H 'Authorization: Bearer stub_xK3...' \
  -H 'Content-Type: application/json' \
  -d '{"content":"Revised text"}'

Omitted fields keep their current value. The slug never changes, even when the title does.

Delete

curl -X DELETE https://stub.page/api/pages/my-first-post-a7f3k2 \
  -H 'Authorization: Bearer stub_xK3...'

Returns 204. The slug is never reused; later requests answer 410 Gone.

Authentication

The edit key goes in the Authorization header only. Passing it as a query parameter is rejected even when the key is valid — query parameters end up in server logs, proxy logs and Referer headers.

Limits

Content100 KB of Markdown
Titlerequired, 200 characters
Request body128 KB
Create10 per hour per IP
Update / delete60 per hour per IP

Formatting

Markdown subset: paragraphs, headings (## to ####), bold, italic, strikethrough, lists, blockquotes, inline and block code, horizontal rules, links, and images. Raw HTML is rendered as text. Images must be https URLs and are embedded, never stored. Links carry rel="nofollow ugc", and posts containing external links are served with noindex.

Errors

400Invalid body or empty content
401Missing or invalid edit key
404No such post
410Post was deleted
413Content too large
429Rate limited — see Retry-After

MCP

The same operations are available to AI agents over MCP (Streamable HTTP) at https://stub.page/mcp, with the tools create_page, get_page, update_page and delete_page. There is no server-wide token: the key belongs to the post, exactly as in the web UI and this API.

{
  "mcpServers": {
    "stub-page": { "url": "https://stub.page/mcp" }
  }
}

Machine-readable specification: openapi.json