Skip to content

HTTP API Overview

The WarmHub HTTP API provides direct access to platform operations — querying data, committing changes, managing shapes, subscriptions, and personal access tokens. Organization and repository management is available via the CLI and SDK. All endpoints accept and return JSON.

All API paths are relative to:

https://api.warmhub.ai/api/

For example:

https://api.warmhub.ai/api/repos/acme/world/head

Authenticated endpoints require an Authorization header with a Bearer token:

Terminal window
curl -H "Authorization: Bearer <token>" \
https://api.warmhub.ai/api/repos/acme/world/head

WarmHub supports two token types:

TypeObtained viaUse case
JWTInteractive login (WorkOS)Browser sessions, credential management
PATPOST /api/patsScripts, CI/CD, programmatic access

PAT tokens carry resource-scoped permissions that limit what they can do. Each scope entry binds a resource (repo or org) to a set of permissions:

ScopeGrants
repo:readRead repositories, queries, shapes
repo:writeCommits, shape mutations
repo:configureSubscriptions, credentials, repo settings
repo:adminDelete, archive, visibility
org:readRead org profiles
org:configureCreate repos, manage members
org:adminRename, archive org

Scopes are independent — repo:write does not include repo:read. Request the specific scopes your token needs.

Scope entries can target a specific repo ("myorg/myrepo"), an entire org ("myorg"), or all resources (global wildcard with no resource field). More specific entries take precedence. Scopes can only narrow access, never escalate beyond the user’s role. A token created without scopes has full user access.

JWT tokens have no scope restrictions. See Authentication for details on creating and managing tokens.

  • Content-Type: application/json for all request bodies
  • Path parameters: URL-encoded (e.g., Shape%2FMyShape for Shape/MyShape)
  • Query parameters: Standard URL query string format
TypeFormatExample
stringPlain textshape=Signal
integerWhole numberlimit=50
booleantrue or falseincludeInactive=true
ISO 8601Date stringsince=2026-01-01T00:00:00Z

All successful responses return JSON with a 200 (or 201 for creation) status code. The response shape varies by endpoint — see each endpoint’s documentation.

All errors return a consistent envelope:

{
"error": {
"code": "NOT_FOUND",
"message": "Thing not found: Sensor/temp-1"
}
}
HTTP StatusError Codes
400VALIDATION_ERROR, SHAPE_MISMATCH, CROSS_REPO_MUTATION, RESERVED_NAME, ILLEGAL_OP_SEQUENCE
401UNAUTHENTICATED
403FORBIDDEN
404NOT_FOUND, WREF_UNRESOLVABLE
409ALREADY_EXISTS, ARCHIVED
429RATE_LIMITED
500INTERNAL_ERROR

When the API returns 429 RATE_LIMITED, it may also include a Retry-After response header with the number of seconds to wait before retrying. Clients should back off and retry after that interval when present.

Most query endpoints support cursor-based pagination. Action endpoints (/actions/runs, /actions/notifications) support limit and since filtering but not cursor pagination.

ParameterDescription
limitMaximum number of items to return per page (max 500). Defaults vary by endpoint.
cursorOpaque pagination token from a previous response’s nextCursor field. Requires limit.
sinceFilter items after this timestamp. On /log: ISO 8601 string or epoch milliseconds. On /actions/runs and /actions/notifications: epoch milliseconds (integer) only.
untilFilter items before this timestamp. Supported on /log.

When more results are available, the response includes a nextCursor field. Pass this value as the cursor parameter on the next request (along with limit) to fetch the next page. When all results have been returned, nextCursor is omitted.

Cursors are opaque strings prefixed with whc1_. They are scoped to the original query — changing filters or repo between pages returns a VALIDATION_ERROR. Passing cursor without limit also returns a VALIDATION_ERROR.

Not all endpoints support all parameters — see each endpoint’s documentation.

Endpoints marked None are publicly accessible for public repositories. Private repositories require a valid Bearer token for all read endpoints — anonymous requests receive a 404.

Organization and repository CRUD is available via the CLI and SDK only — no REST endpoints are currently mounted. See Organizations & Repositories for details.

MethodPathDescriptionAuth
GET/api/repos/:org/:repo/headHEAD snapshotNone
GET/api/repos/:org/:repo/logCommit logNone
GET/api/repos/:org/:repo/historyVersion historyNone
GET/api/repos/:org/:repo/things/:wrefGet thing by wrefNone
GET/api/repos/:org/:repo/about/:wrefAssertions about a thingNone
GET/api/repos/:org/:repo/queryFiltered queryNone
GET/api/repos/:org/:repo/countCount matching itemsNone
GET/api/repos/:org/:repo/resolve/:wrefResolve wrefNone
MethodPathDescriptionAuth
POST/api/repos/:org/:repo/commitCreate commitrepo:write
MethodPathDescriptionAuth
GET/api/repos/:org/:repo/shapesList shapesNone
GET/api/repos/:org/:repo/shapes/:shapeNameGet shapeNone
POST/api/repos/:org/:repo/shapesCreate shaperepo:write
PATCH/api/repos/:org/:repo/shapes/:shapeNameRevise shaperepo:write
DELETE/api/repos/:org/:repo/shapes/:shapeNameDelete shaperepo:write
MethodPathDescriptionAuth
GET/api/repos/:org/:repo/subsList subscriptionsNone
GET/api/repos/:org/:repo/subs/:nameGet subscriptionNone
POST/api/repos/:org/:repo/subsCreate subscriptionrepo:write
PATCH/api/repos/:org/:repo/subs/:nameUpdate subscriptionrepo:write
POST/api/repos/:org/:repo/subs/:name/pausePause subscriptionrepo:write
POST/api/repos/:org/:repo/subs/:name/resumeResume subscriptionrepo:write
POST/api/repos/:org/:repo/subs/:name/bindBind credentialsrepo:write
DELETE/api/repos/:org/:repo/subs/:name/bindUnbind credentialsrepo:write
DELETE/api/repos/:org/:repo/subs/:nameDelete subscriptionrepo:write
GET/api/repos/:org/:repo/actions/runsList action runsNone
GET/api/repos/:org/:repo/actions/subs/:sub/commits/:num/attemptsGet run attemptsNone
GET/api/repos/:org/:repo/actions/notificationsList action failure notificationsNone
MethodPathDescriptionAuth
POST/api/repos/:org/:repo/credentials/setsCreate credential setRequired
GET/api/repos/:org/:repo/credentials/setsList visible credential setsRequired
GET/api/repos/:org/:repo/credentials/sets/:nameGet credential set metadataRequired
MethodPathDescriptionAuth
POST/api/patsCreate PATJWT only
GET/api/patsList PATsJWT only
DELETE/api/pats/:nameRevoke PATJWT only