Skip to the article

API

Everything the interface does, it does through this. There is no separate path — which is also why an agent connected to your account cannot reach anything you could not.

Authenticating

A key from Settings → Keys and connections → API keys, sent as a bearer token. It is shown once and stored hashed, so a leak of our database is not a list of working keys.

curl https://solta.now/v1/me \
  -H "Authorization: Bearer solta_…"

Connectors use OAuth instead — see Connect Claude or ChatGPT. Both resolve to the same account with the same authority.

Publishing a file

curl -X POST https://solta.now/v1/sites \
  -H "Authorization: Bearer solta_…" \
  -H "Content-Type: application/json" \
  -d '{"source": "export default () => <h1>hi</h1>",
       "filename": "App.tsx",
       "title": "Hello",
       "channel": "api"}'

Returns the slug, the version number and the link. Send an Idempotency-Key header and retrying the same request will not publish twice.

A person on Free has 2 live sites at a time, across their own library and the Free workspaces they own, and on Plus 10 across their Plus ones. Pro and Team have no limit. At the limit, a new site (a file, a folder or a remix) is a 402 with the code site_limit: nothing is published, and the answer lists the live sites, each with its library, how many must go (toUnpublish), and the libraryUrl and upgradeUrl. Add a version to one of the sites instead, which keeps its link, or make room first: POST /v1/sites/{id}/offline takes a site offline, keeping everything, and POST /v1/sites/{id}/online puts it back, which is refused the same way at the limit. A new version of a site is never refused for this.

Publishing a folder

A separate endpoint, because the body is a file rather than JSON. Send the archive as archive, or a url we should read it from.

curl -X POST https://solta.now/v1/sites/archive \
  -H "Authorization: Bearer solta_…" \
  -F "archive=@dist.zip" \
  -F "title=My site"

Files a website doesn’t use are left out and the rest is published: anything that can hold secrets (.env and every .env.*, .npmrc, private keys, credentials.json), hidden files and folders such as .git, and types we don’t serve, such as server code. The answer lists them in skipped, each with its path and a reason of secret, hidden or unsupported, and says the same in warnings for a person to read. A folder that is an app’s source code rather than its build is a 422 with the code needs_build.

A new version is a draft. The link keeps serving what it served until you publish it — which is two calls on purpose, so nothing goes live by accident.

POST /v1/sites/{id}/versions            → { number: 2, state: "draft" }
POST /v1/sites/{id}/versions/2/publish  → { number: 2, state: "live" }

Or one call: "publish": true in the first makes it live straight away, unless the site needs approval; then the answer has awaitsApproval: true and the version waits as a draft.

Now and then our checks want a person to look at a page before it goes live, usually within a day. The answer then has held: { url }: the site’s link says the page is being checked until it is cleared, and url is a page that says how it stands, where somebody who published without an account can leave an email address to be told. Publishing it again changes nothing.

A folder changes by its files. POST /v1/sites/{id}/versions/files takes multipart form data: files to add (a .zip among them is opened, and a file with a name already there replaces it), a remove for each path to take out, and replace=true when the upload is the whole site. With publish=true it goes live in the same call, unless the site needs approval; then the answer has awaitsApproval: true and the version waits as a draft. Among several files, or in a .zip, what a folder leaves out is left out here too, and listed in skipped; one file sent on its own that we wouldn’t publish is refused instead.

The rest

GET /v1/library
Your sites.
GET /v1/sites/{slug}
One site, its live version and its history.
PATCH /v1/sites/{id}/visibility
Who can open it.
PATCH /v1/sites/{id}
Its title, or its address with { "slug": "…" }. The old address keeps sending people on. A short address, 4 characters or fewer, or a one-word address, a common word on its own, needs Pro or Team: on Free it is a 402 with code: "needs_pro_short_address", and past the plan’s short or one-word addresses, short_address_limit. An address that names a company or bank is a 422 with slug_brand, on any plan.
GET, POST /v1/sites/{id}/addresses
Its addresses, and another one with { "slug": "…" } that sends visitors to the main one (Pro and Team). POST …/addresses/{slug}/main makes one the main address; DELETE …/addresses/{slug} makes it an old address. Refused with needs_pro_extra_address, extra_address_limit, needs_pro_short_address, short_address_limit, slug_brand or slug_taken.
GET /v1/sites/{id}/compare?from=1&to=2
What changed between two versions.
DELETE /v1/sites/{id}
Stops serving immediately. The address is held for at least a year, and for as long as it's used; after 6 months without visits we email you, and a month later it's freed.

Errors

A JSON body with error, and detail when there is something useful to add. A file we refuse — a planted key, an unsupported type — is a 422 with the reason in words, not a stack trace.