Skip to main content
All endpoints require an Authorization: Bearer sm_… header and live under https://useshareable.com/api/v1.

The page object

id
string
Unique page ID.
slug
string
URL slug. The page is served at /p/{slug}.
url
string
Full public URL.
title
string | null
Display title.
access
string
link, people, private, or password. See access levels.
allowed_emails
string[]
Invited emails (when access is people).
password
string
The page password, for you to share (only on single-page responses — create, get, update, publish — when access is password; omitted from the list).
indexed
boolean
Whether search engines may index the page. Default false.
kind
string
single for a one-file page, or bundle for a multi-page deck.
entry_path
string | null
For a bundle, the file served at the deck root (e.g. index.html).
file_count
number
Number of HTML files (always 1 for a single page).
is_published
boolean
Whether a published version is live.
has_unpublished_changes
boolean
Whether the draft differs from the published version.
published_at
string | null
ISO timestamp of last publish.
created_at
string
updated_at
string

Create a page

POST /api/v1/pages Pass html for a single page, or files for a multi-page deck — not both.
html
string
Complete, self-contained HTML document (all assets inlined). Required for a single page.
files
object[]
Array of { path, html } for a multi-page deck. Each html must be self-contained; link between pages with relative (team.html) or root-relative (/team.html) paths. Limits: up to 60 files, 2 MB per file, 12 MB per deck.
entry
string
For a deck, which file is the landing page. Defaults to index.html, else the shallowest file.
title
string
Display title.
access
string
default:"link"
link, people, private, or password.
allowed_emails
string[]
Emails allowed to view when access is people.
password
string
Password to protect the page when access is password. If omitted, one is generated and returned in the response.
publish
boolean
default:"true"
When false, saves a private draft without going live.
indexed
boolean
default:"false"
Allow search-engine indexing.
curl -X POST https://useshareable.com/api/v1/pages \
  -H "Authorization: Bearer sm_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "html": "<!doctype html><h1>Hi</h1>", "title": "Demo", "access": "link" }'
Returns the page object with status 201.
Multi-page deck
curl -X POST https://useshareable.com/api/v1/pages \
  -H "Authorization: Bearer sm_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Acme deck",
    "entry": "index.html",
    "files": [
      { "path": "index.html",   "html": "<!doctype html><a href=\"team.html\">Team</a>" },
      { "path": "team.html",    "html": "<!doctype html><h1>Team</h1>" }
    ]
  }'
The deck is served at /p/{slug} (the entry file) and each file at /p/{slug}/{path}.

List pages

GET /api/v1/pages Returns an array of the authenticated account’s pages, newest first.
curl https://useshareable.com/api/v1/pages \
  -H "Authorization: Bearer sm_your_key"

Retrieve a page

GET /api/v1/pages/
curl https://useshareable.com/api/v1/pages/PAGE_ID \
  -H "Authorization: Bearer sm_your_key"

Update a page

PATCH /api/v1/pages/ Updating html or files changes the draft only — call publish to push it live.
html
string
New HTML (saved as draft). Single pages only — not decks.
files
object[]
For a deck, the full new set of { path, html } files (saved as draft). Files not included are removed; same limits as create (60 files, 2 MB each, 12 MB total). Optionally pass entry to set the landing page.
entry
string
For a deck, re-point the landing page to an existing file path.
title
string
access
string
link, people, private, or password.
allowed_emails
string[]
password
string
Set/replace the password (when access is password).
indexed
boolean
curl -X PATCH https://useshareable.com/api/v1/pages/PAGE_ID \
  -H "Authorization: Bearer sm_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "access": "private" }'

Delete a page

DELETE /api/v1/pages/ Permanently deletes the page. Returns status 204.
curl -X DELETE https://useshareable.com/api/v1/pages/PAGE_ID \
  -H "Authorization: Bearer sm_your_key"

Versions

A version is saved automatically on each publish and each edit (deduplicated by content). Named versions are kept forever; older unnamed ones are pruned.

List versions

GET /api/v1/pages//versions Returns { version_no, source, label, size_bytes, created_at }[], newest first. source is publish, edit, or restore.

Get a version

GET /api/v1/pages//versions/ Returns the version’s metadata plus its content — html for a single page, or files + entry for a deck.

Restore a version

POST /api/v1/pages//versions//restore
publish
boolean
default:"false"
When true, also publish the restored content live. Otherwise it’s restored to the draft only.
Restoring appends a new restore version. Returns the updated page object.
curl -X POST https://useshareable.com/api/v1/pages/PAGE_ID/versions/3/restore \
  -H "Authorization: Bearer sm_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "publish": true }'

Name a version

PATCH /api/v1/pages//versions/
label
string | null
A name for the version (named versions are never pruned). null clears it.