The API

Everything the CLI does, over HTTP, with a token that can reach themes and nothing else.

Authentication

A theme token, in an Authorization header. Get one from the Eldorados admin under Websites → the site → Themes.

Authorization: Bearer eld_theme_...

A token is scoped to one organisation, optionally pinned to a single site, and carries only read_themes and write_themes. It cannot read form submissions, leads or page drafts — not because a check refuses it, but because the credential has no way to ask. Hand one to a contractor without handing over the account.

Endpoints

EndpointScopePurpose
GET /api/v1/themes?site=read_themesThemes on a site, with their snapshots
GET /api/v1/themes/:snapshotread_themesThe manifest: every path, hash and size
GET /api/v1/themes/:snapshot/files?path=read_themesOne file, ETag’d on its content hash
POST /api/v1/themes/pushwrite_themesUpload a theme, sending only what is new
POST /api/v1/themes/:snapshot/publishwrite_themesMake a snapshot live

Pushing

Send a hash per file. If the server is missing any blob it answers 409 with missing, and you resend with the content of exactly those files.

POST /api/v1/themes/push
{
  "siteId": "site_abc123",
  "label": "from CI",
  "files": {
    "layout/theme.liquid": { "hash": "a1b2…", "content": "<!doctype html>…" },
    "sections/hero.liquid": { "hash": "c3d4…" }
  }
}

Content is re-hashed on arrival and a mismatched claim is refused. A push is atomic: the whole theme is validated first and nothing is written if it fails, so a half-pushed theme cannot exist and therefore cannot be published.

Errors

StatusMeans
401No valid token. The message is the same whatever is wrong with it.
403The token lacks the scope, which the message names.
404No such site, theme or snapshot — or it is not yours. Deliberately the same answer.
409Missing blobs, or the theme changed since you pulled.
422The theme did not validate. The body lists every offense with file and line.