REST API

Developer API

Automate WriteXO with a personal API token. Create pages from scripts, append daily logs, search your library, and connect Zapier, n8n, Shortcuts, or cron. Available on every plan - Free accounts get unlimited pages.

Get a token

Any signed-in account can generate an API token. Tokens look like wxo_… and are shown only once when generated. Free plans can create unlimited pages.

1

Create a free WriteXO account (or log in).

2

In the editor, open Account Settings (sidebar) → API, then generate a personal token. Open API settings if you’re already signed in.

3

Store it securely (password manager, env var, or secrets store).

Authentication

Send your token on every request:

HTTP
Authorization: Bearer wxo_your_token_here
Base URL https://writexo.com

Endpoints

Method Path Description
GET /api/me Confirm token and plan
GET /api/pages List pages (limit, offset, optional type)
GET /api/pages/{id_or_slug} Get one page by id or main_url
POST /api/pages Create a page
PATCH /api/pages/{id_or_slug} Update title and/or body
POST /api/pages/{id_or_slug}/append Append text or HTML (great for logs)
DELETE /api/pages/{id_or_slug} Delete a page
GET /api/pages/search?q= Search title and body
POST /api/login Optional: email/password → token (prefer Settings token)

Create a page

cURL
curl -X POST https://writexo.com/api/pages \
  -H "Authorization: Bearer wxo_…" \
  -H "Content-Type: application/json" \
  -d '{"title":"From automation","content":"Hello from curl"}'

# Or send HTML for formatting:
curl -X POST https://writexo.com/api/pages \
  -H "Authorization: Bearer wxo_…" \
  -H "Content-Type: application/json" \
  -d '{"title":"Styled","content":"

Hello world

"}'

Body fields

  • titleOptional page title
  • contentPage body as plain text or HTML
  • typeDefault page (todo, board, etc. also accepted)
  • passwordOptional page password

Append to a page

Ideal for daily logs and automated appends without replacing existing content. content may be plain text or HTML.

cURL
curl -X POST https://writexo.com/api/pages/my-daily-log-abc123/append \
  -H "Authorization: Bearer wxo_…" \
  -H "Content-Type: application/json" \
  -d '{"content":"2026-07-09: shipped the API","separator":"\n"}'

List, get, search, delete

cURL
# List
curl https://writexo.com/api/pages?limit=20 \
  -H "Authorization: Bearer wxo_…"

# Get by id or slug
curl https://writexo.com/api/pages/123 \
  -H "Authorization: Bearer wxo_…"

# Search
curl "https://writexo.com/api/pages/search?q=meeting" \
  -H "Authorization: Bearer wxo_…"

# Delete
curl -X DELETE https://writexo.com/api/pages/123 \
  -H "Authorization: Bearer wxo_…"

Response shape

Detail responses include a page object. content is returned as HTML (formatting preserved when present). List and search omit content for smaller payloads.

JSON
{
  "page": {
    "id": 123,
    "title": "From automation",
    "main_url": "from-automation-a1b2c3d4e5f6",
    "share_url": "…",
    "type": "page",
    "last_updated": 1710000000,
    "urls": {
      "edit": "https://writexo.com/from-automation-a1b2c3d4e5f6",
      "share": "https://writexo.com/s/…"
    },
    "content": "

Hello from curl

" } }

Errors

Status Code Meaning
401 UNAUTHORIZED Missing or invalid token
403 PAGE_LIMIT_REACHED Plan page limit reached (no page cap on current plans)
403 LEGAL_HOLD / RETENTION_LOCK Page cannot be edited or deleted
404 NOT_FOUND Page not found (or not yours)
413 DOC_TOO_LARGE Body exceeds the 10 MB size limit

Error bodies look like:

JSON
{"error":"UNAUTHORIZED","message":"Invalid token."}

Limits & security

  • API access is available on every plan. Free accounts can create unlimited pages (same as the web app).
  • Do not commit tokens to git or paste them in public gists.
  • Revoke or regenerate a token immediately if it leaks.
  • Pages created via the API appear in your library and open in the web editor.
  • You can only access pages owned by the token’s account.

Ready to automate?

Generate a personal token and create your first page in under a minute.