Sitepaste API Documentation

The Sitepaste API lets you manage pages, upload media, and trigger builds programmatically. It is available to Pro plan users.

You can use it from a GitHub Action, an iPhone shortcut, a CLI script, or any HTTP client.

Base URL

https://sitepaste.com/api/v1/public

All requests must use HTTPS.

Endpoints

MethodPathPurpose
POST/pagesCreate, update, or delete pages in batch
GET/pagesList page metadata for a site
DELETE/pages/{slug}Delete a single page by slug
POST/mediaUpload a standalone media file
POST/buildsTrigger a site build
GET/builds/latestGet the most recent build status

Authentication

Every request requires a bearer token in the Authorization header:

Authorization: Bearer sp_your_token_here

Tokens are created from the dashboard under Settings > API tokens. See authentication for details.

Quick example

TOKEN="sp_your_token_here"

# Create a page and trigger a build in one request
curl -X POST https://sitepaste.com/api/v1/public/pages \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pages": [
      {
        "title": "Hello world",
        "content": "# Hello world\n\nPublished via the API.",
        "tags": ["first-post"]
      }
    ],
    "build": true
  }'

Response format

All responses return JSON. Successful responses use 200, 202, or 204 status codes. Error responses include an error field:

{
  "error": "validation failed",
  "pages": {
    "0": { "title": "title is required for new pages" }
  }
}

Status codes

CodeMeaning
200Success
202Accepted (builds)
204No content (deletes)
400Invalid request
401Missing or invalid token
402Storage or build quota exceeded
404Resource not found
413Request body too large
429Rate limit or cooldown active
500Server error
503Server busy (retry shortly)

Rate limiting

API requests are limited to 120 per minute per IP address. Batch operations count as a single request, so prefer sending multiple pages in one call rather than making separate requests.

Documentation