API
The control plane answers at https://api.tori.host. Customer routes require a bearer token. Mint one in the console under Settings → API tokens, or use the token the CLI saves after sign-in (TORI_TOKEN in CI).
Authorization: Bearer <token>Admin, enrollment, and zone-protocol endpoints are not part of the public documentation set.
Interactive reference
Section titled “Interactive reference”The API reference is a Scalar explorer of the public OpenAPI document generated from the server. Try-it-out calls https://api.tori.host from this origin. There is no documentation proxy; the token stays in this tab and is not written to localStorage. CORS allows https://docs.tori.host.
Pagefind indexes this overview and the representative operation page below. The Scalar panel is rendered in the browser and is not the search index.
Representative operation
Section titled “Representative operation”- GET /api/apps — list the signed-in account’s apps
Task-oriented examples
Section titled “Task-oriented examples”Replace <token> with a secret from Settings → API tokens (or the token tori login saved). Replace <slug> with the app in tori.json. Request and response schemas live in the interactive reference; these examples do not repeat them.
List apps (listApps):
curl -sS -H "Authorization: Bearer <token>" \ https://api.tori.host/api/appsShow the signed-in account and plan (getAccount):
curl -sS -H "Authorization: Bearer <token>" \ https://api.tori.host/api/accountList deploys (listDeploys):
curl -sS -H "Authorization: Bearer <token>" \ https://api.tori.host/api/apps/<slug>/deploysRead logs (listLogs) — ISO timestamps, maximum 24 hours, limit 1–500. Bounds must fall inside retention (retentionDays on the response; a start older than that is HTTP 410). Generate them rather than copying a calendar day:
start=$(date -u -v-15M +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '15 minutes ago' +%Y-%m-%dT%H:%M:%SZ)end=$(date -u +%Y-%m-%dT%H:%M:%SZ)curl -sS -H "Authorization: Bearer <token>" \ "https://api.tori.host/api/apps/<slug>/logs?start=${start}&end=${end}&limit=200"Set a service environment variable (setEnvVar). On a service it applies on the next deploy. On a static app the API still stores the row; static deploys do not snapshot it:
curl -sS -X PUT -H "Authorization: Bearer <token>" \ -H 'Content-Type: application/json' \ -d '{"key":"API_TOKEN","value":"secret"}' \ https://api.tori.host/api/apps/<slug>/envCreating a static deploy is POST /api/apps/{slug}/deploys as multipart/form-data (createDeploy). A service deploy is the same path: JSON { "image": "registry/repo@sha256:…" } for a digest you brought, or multipart/form-data with a source tarball for a Tori build. Prefer the CLI for those: it handles packing, digest checks, progress, and waiting until live. Try-it-out for the rest is on the Scalar page.
Downloads
Section titled “Downloads”- OpenAPI document (
openapi.public.json) - Markdown sources
Agents and scripts should prefer the Markdown and OpenAPI downloads over scraping the HTML.
Download this page as Markdown.