The admin API

The CLI calls these endpoints; you can call them with curl too. Every request needs Authorization: Bearer <admin token>, except GET /admin/auth/methods. A script of your own should send a User-Agent that names it: a server may refuse old CLIs, and Node's fetch sends only node, which looks like one.

Method Path Body Answer
GET /admin/auth/methods no token {methods: [{type, ...}]}: how to log in to this server, below
POST /admin/auth/logout {} {revoked}: the token the request carries stops working (october logout)
GET /admin/whoami {email, label, tokenId, tenants, names}: tenants the slugs, names each slug's name; where the server has orgs, orgs: [{slug, name, role}] too
GET /admin/tenants {tenants: [{slug, name, status, managed, demo, createdAt}]}, the tenants you administer; where the server has orgs, each with its org
POST /admin/tenants {name, schema, demo} (schema, demo optional; demo default false), plus org (its slug) where the server has orgs, or {slug, ...} where the server takes slugs {slug, name, hash, demo}: slug is the tenant's
POST /admin/tenants/<slug>/delete {confirm: "<slug>"} {slug, deleted}: a tenant you created (where the server has orgs: one of an org you own) goes offline and leaves your listing (and frees a place under the limit); 400 confirm-required without the slug
POST /admin/tenants/<slug>/transfer {org, confirm: "<slug>"} {slug, org}: moves the tenant to another org you own; its slug, URL, data and users stay. 403 org-full, 409 name-taken
GET /admin/orgs {orgs: [{slug, name, role, tenants, createdAt}]}, yours
POST /admin/orgs {name} {slug, name, adopted}: you are its owner; adopted the tenants you made before orgs, now in it; 403 org-limit past the orgs you may own
GET /admin/orgs/<org> {slug, name, role, tenants: [{slug, name}], limits: {tenants, used}}
PUT /admin/orgs/<org>/name {name} {slug, name} (an owner)
POST /admin/orgs/<org>/delete {confirm: "<org>"} {slug, deleted} (an owner, with no live tenant: else 409 org-not-empty)
GET /admin/orgs/<org>/people {people: [{email, role, addedAt}]}
PUT /admin/orgs/<org>/people/<email> {role} (owner or developer) {email, role} (an owner); 409 last-owner
DELETE /admin/orgs/<org>/people/<email> {removed} (an owner, or yourself to leave); 409 last-owner
GET /admin/orgs/<org>/invites {invites: [{id, email, role, expiresAt}]} (an owner)
POST /admin/orgs/<org>/invites {email, role} {id, email, role, expiresAt, sending} (an owner): the address is emailed; it lasts 7 days
DELETE /admin/orgs/<org>/invites/<id> {revoked} (an owner)
GET /admin/org-invites {invites: [{id, org: {slug, name}, role, expiresAt}]}: the invites to your address
POST /admin/org-invites/<id>/accept {} {org: {slug, name}, role}: only the invited address
GET /admin/tenants/<slug>/schema {schema, hash}
POST /admin/schema/check {schema} {valid, errors, warnings} (see october check)
POST /admin/tenants/<slug>/schema/plan {schema} the plan; an invalid schema is 400 bad-schema with errors, the list check gives
POST /admin/tenants/<slug>/schema/apply {schema, currentHash, newHash, allowDestructive} {hash, added, altered, retired}
GET /admin/tenants/<slug>/versions {versions: [{hash, appliedAt, by}]}
GET /admin/tenants/<slug>/origins {origins}
PUT /admin/tenants/<slug>/origins {origins} (replaces the list) {origins}
GET /admin/tenants/<slug>/events ?limit=N {events: [{at kind detail}]}, newest first (see october events)
GET /admin/tenants/<slug>/demo {demo}
PUT /admin/tenants/<slug>/demo {demo} (a boolean) {demo}; turning it on is 409 email-grants while the tenant has role grants by email
GET /admin/tenants/<slug>/roles {roles: [{role, scope, doc, grant, retired}], grants: [{id, role, user: {id, email}, email, scope: {id, type}, grantedBy, grantedAt}]}
POST /admin/tenants/<slug>/roles/grants {role, email} or {role, userId}, plus scopeId for a scoped role {grant}; 409 demo-mode for an email in demo mode, 404 unknown-entity for a scope or user that doesn't exist
DELETE /admin/tenants/<slug>/roles/grants/<id> {revoked}
DELETE /admin/tenants/<slug>/users/<email>?confirm=<email> {erased, tokens, codes, grants, entities, basisT}; 404 unknown-user
GET /admin/tenants/<slug>/export the export, streamed as application/x-ndjson; its basis-t also in X-October-Basis-T
GET /admin/tenants/<slug>/data {tenant, basisT, at, etypes: [{type, count, capped, label, attrs}]}: the data reads
GET /admin/tenants/<slug>/data/<type> ?first=N&after=<id>&where=<field>&value=<text>&op=eq|contains {type, basisT, items, next, partial, scanned}
GET /admin/tenants/<slug>/data/<type>/<id> ?asOf=<basisT> {basisT, asOf, at, item, incoming: [{type, field, count, capped, ids}]}
GET /admin/tenants/<slug>/data/<type>/<id>/history ?first=N&before=<basisT> {revisions: [{basisT, at, by, changes: [{field, added, retracted}]}], next, partial}

GET /admin/auth/methods lists the ways this server lets an admin log in, in the order to offer them. It is the same for everyone, and cacheable (Cache-Control: public, max-age=300). token is always first: an admin token for the server. A server that logs you in in the browser adds device (the OAuth device flow, RFC 8628: where to start a login, the page to verify it on, and where to poll for the token). It describes the server, never a given address. On the hosted october:

Lang
JSON
{"methods": [{"type": "token"},
             {"type": "device", "start": "/account/device/start",
              "token": "/account/device/token", "verify": "/device"}]}

A server from before this endpoint answers 404; the CLI then logs in as it always did.

schema is the EDN text, as a JSON string.

Every /admin/tenants/<slug>/... endpoint answers 404 {"type":"not-found","message":"No tenant <slug> that you administer"} for a tenant your token doesn't administer, exactly as for a slug that doesn't exist; every /admin/orgs/<org>/... endpoint answers 404 {"type":"not-found","message":"No org <org> that you belong to"} for an org you aren't in, and 403 owner-only for an owner's power asked by a developer. POST /admin/tenants answers 409 slug-taken for a taken slug, 409 name-taken for a name one of your tenants has already, 400 name-required for a slug on a server that makes slugs (send name; the answer's slug is the tenant's), 403 {"type":"tenant-limit","limit":5,...} past your limit (on a server without orgs), 429 create-limit (with Retry-After) past the tenants you may create in a UTC day, and 403 server-full when the server takes no more tenants. Where the server has orgs: 400 org-required without org, the 404 of an org for one you aren't in, and 403 {"type":"org-full","limit":1,...} past the org's live tenants.

Terminal
curl -s https://october.sombra.so/admin/tenants -H "authorization: Bearer $TOKEN"
$ curl -s https://october.sombra.so/admin/tenants -H "authorization: Bearer $TOKEN"
{"tenants":[{"slug":"scratch-k3f9q","name":"scratch","status":"active","managed":true,"demo":false,"createdAt":"2026-10-18T10:49:29.895Z"}]}

$ curl -s https://october.sombra.so/admin/tenants/scratch-k3f9q/versions -H "authorization: Bearer $TOKEN"
{"versions":[{"hash":"a0c43ec4d852cf693fe3bcaa2173ed19ddf0b4da9357e46b78059a6c4b10ab43",
              "appliedAt":"2026-10-18T10:49:29.895Z","by":"dev@localhost.test"}]}

One tenant is the server's own app: the slug its config names as :site (demo on october's own box). It is a managed tenant like every other, so plan, push and pull work on it: the build's schema is what it starts from when it is first created, and after that it is yours to push. Its slug is reserved — POST /admin/tenants with that slug is 400 bad-tenant — so no one takes the urls it serves. The public demo's data is reset daily by the service.

Decided by the server, not by your token: whether a tenant's sign-in codes are emailed (api-sign-in.md), its send limits and daily caps, its notifications, and its status. A disabled tenant's API answers 404 {"type":"unknown-tenant"}, as for a tenant that doesn't exist; its data stays. On the hosted service these are set by the service.

Reading a tenant's data#

GET /admin/tenants/<slug>/data/... reads one tenant's data, for its own admins. It never writes. Each entity is shaped as its line in the export: type, id, createdAt, createdBy and attrs by field name. A ref is its target's id, and an enum value is its name. A list item adds label, the value of the type's name-like field. The secret types ($magicCodes, $userRefreshTokens) answer 404, as an unknown type does. Rules and :view do not apply: you see what the export gives you.

  • The overview lists the types, each with its count and its fields.
  • A page lists one type in creation order, at most 100 items (first, 50 by default). Pass next as after for the next page. With where, value and op, a page keeps only the items whose field matches: eq compares the value as text (a ref by its target's id; a many ref matches any of its ids), contains looks for it in the text, case-insensitive. A json field is one value. A filtered page examines at most 5,000 entities: then partial is true, and next continues the scan.
  • One entity has the refs that point at it, a group per field. With asOf, a basisT, you get the entity as it was then. A deleted entity answers 404 now, but asOf a basisT before its delete shows it.
  • History lists the entity's revisions, newest first, its delete included: each with its basisT, its time, the fields that changed (the values set and removed), and by, who made it. by is the app user's email, erased user for a user erased since, admin <email> for an admin's change (a role grant, an import), or system with what it was (system: seed). Pass next as before for older ones.

Erased data stays gone: an erased user's email and fields are removed from history too, so no read here shows them.

Terminal
curl -s "https://october.sombra.so/admin/tenants/scratch-k3f9q/data/todos?first=1" -H "authorization: Bearer $TOKEN"
$ curl -s "https://october.sombra.so/admin/tenants/scratch-k3f9q/data/todos?first=1" -H "authorization: Bearer $TOKEN"
{"type":"todos","basisT":1042,"items":[{"type":"todos","id":"6f1c…","createdAt":"2026-12-02T09:14:03.120Z",
  "createdBy":"3b2e…","attrs":{"title":"Buy milk","done":false},"label":"Buy milk"}],"next":"6f1c…","partial":false}

Every request spends a point from your own bucket: 120, refilled at 2 a second. Past it the answer is 429 rate-limited with Retry-After. The limits list the caps.