SendPage

API

Publish HTML as a link — from your code

One POST turns an HTML document into a hosted link that opens in one tap, previews as a card in WhatsApp, Slack and email, and exports to PNG, PDF or Word. A plain REST API with a Bearer key — no SDK, no browser to run. It's the same engine behind the website and the MCP server.

Quickstart

1. Get an API key

Generate one below. It is shown once — store it as a server-side secret and never ship it to a browser.

Your API key

No signup. The key is tied to this browser — keep it somewhere safe.

Then run this once:

claude mcp add --transport http sendpage https://sendpageapp.com/api/v1 \
  --header "Authorization: Bearer YOUR_KEY"

2. Publish a document

curl -X POST https://sendpageapp.com/api/v1/documents \
  -H "Authorization: Bearer sp_live_..." \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Q3 Proposal</h1><p>Hello!</p>","title":"Q3 Proposal"}'

3. Get back a link

{
  "id": "ab12cd34",
  "url": "https://sendpageapp.com/d/ab12cd34",
  "edit_token": "…",
  "is_pro": false
}

Send that url to anyone. Keep the edit_token secret — it authorizes updates.

Authentication

Every request needs Authorization: Bearer <key>. Keys look like sp_live_…, are stored only as a hash, and can be revoked at any time. A missing or invalid key returns 401.

Endpoints

Base URL: https://sendpageapp.com/api/v1

Full machine-readable schema: OpenAPI 3.1 spec.

Export to PDF / PNG / Word

curl -X POST https://sendpageapp.com/api/v1/documents/ab12cd34/export \
  -H "Authorization: Bearer sp_live_..." \
  -H "Content-Type: application/json" \
  -d '{"format":"pdf"}'
# → { "id": "ab12cd34", "format": "pdf", "url": "…/export?format=pdf" }
# then GET that url to download the file

In your language

JavaScript (fetch)

const res = await fetch("https://sendpageapp.com/api/v1/documents", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SENDPAGE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ html: "<h1>Hello</h1>", title: "Hello" }),
});
const { url } = await res.json();

Python (requests)

import os, requests
r = requests.post(
    "https://sendpageapp.com/api/v1/documents",
    headers={"Authorization": f"Bearer {os.environ['SENDPAGE_API_KEY']}"},
    json={"html": "<h1>Hello</h1>", "title": "Hello"},
)
print(r.json()["url"])

Errors

Errors return { "error": { "code", "message" } }:

Limits

Prefer no HTTP calls?

If you drive an AI assistant, the same actions are available over MCP — see the MCP docs. The REST API and MCP share one engine, so documents you publish either way behave identically.

Ready to build?

Generate a key above and make your first request.

Get your API key