GET /health
Liveness No token
200The server is up. (Health)
API reference
Send a notice to enrolled devices of a tenant and read its delivery and acknowledgement receipts. Contract version 1.0.0, OpenAPI 3.1.0.
A tenant API credential: 20 to 128 characters of [A-Za-z0-9_-], issued once by the tenant's admin (role sender) or the operator. The server keeps only its SHA-256. The operator's own token is accepted too but is not part of this contract.
The base address is the operator's: a self-hosted server answers on http://127.0.0.1:8787 by default.
/healthLiveness No token
200 The server is up. (Health)/tenants/{tenantId}/noticesSend a notice to enrolled devices Bearer tenant token
Role sender only. Every addressee must be an enrolled, unrevoked device of this tenant; otherwise 403 with the same answer for an unknown, another tenant's or a revoked device, so a sender learns nothing about devices outside its tenant. The notice and one queued receipt per device commit together.
tenantId path, requiredpersonal is never a tenant: every route refuses it (403).Body: SendNoticeRequest
201 The notice was queued for every addressee. (SentNotice)400 The request is malformed or breaks a limit. (Error)401 No credential, or one the server does not know. (Error)403 The credential is of another tenant, its role may not do this, an addressee is not an enrolled device of this tenant, or the tenant is personal. (Error)404 No such tenant or notice (or it is another tenant's). (Error)503 Notice delivery is not configured on this server. (Error)/tenants/{tenantId}/notices/{noticeId}Delivery state per device Bearer tenant token
Roles sender and tenant-admin. Overdue deliveries are expired before the answer. A notice of another tenant is 404.
tenantId path, requiredpersonal is never a tenant: every route refuses it (403).noticeId path, required200 The notice and one delivery per addressee. (NoticeStatus)401 No credential, or one the server does not know. (Error)403 The credential is of another tenant, its role may not do this, an addressee is not an enrolled device of this tenant, or the tenant is personal. (Error)404 No such tenant or notice (or it is another tenant's). (Error)503 Notice delivery is not configured on this server. (Error)/tenants/{tenantId}/notices/{noticeId}/revokeTake a notice back Bearer tenant token
Role sender only. Every open delivery (queued or delivered) becomes revoked, sealed; acknowledged and expired deliveries keep their state. Idempotent.
tenantId path, requiredpersonal is never a tenant: every route refuses it (403).noticeId path, required200 The deliveries after the revocation. (RevokedNotice)401 No credential, or one the server does not know. (Error)403 The credential is of another tenant, its role may not do this, an addressee is not an enrolled device of this tenant, or the tenant is personal. (Error)404 No such tenant or notice (or it is another tenant's). (Error)503 Notice delivery is not configured on this server. (Error)/tenants/{tenantId}/notices/{noticeId}/receiptsThe sealed receipt chain of a notice Bearer tenant token
Roles sender and tenant-admin. events is the whole chain, oldest first. check is the server's own check and is informative only: a client verifies events itself against the seal keys it pinned. A receipt never carries the notice's content, only its digest.
tenantId path, requiredpersonal is never a tenant: every route refuses it (403).noticeId path, required200 The chain and the server's check of it. (NoticeReceipts)401 No credential, or one the server does not know. (Error)403 The credential is of another tenant, its role may not do this, an addressee is not an enrolled device of this tenant, or the tenant is personal. (Error)404 No such tenant or notice (or it is another tenant's). (Error)503 Notice delivery is not configured on this server. (Error)ErrorEvery error. The HTTP status is the contract; error is a human-readable sentence that may change between minor versions.
error requiredHealthstatus requiredserviceversionDeviceIdA device ID: base32 of SHA-256 over the device's P-256 SPKI key, first 26 characters.
string
DigestLowercase hex SHA-256.
string
UnixMillisinteger
NoticeContenttype required"text" | "html" | "json" | "binary" | "audio" | "event"body requiredmimeTypeNoticeActionid requiredlabel requiredFollowUpRequestafterMinutes requiredtimes requiredFollowUpafterMs requiredtimes requiredSendNoticeRequestto requiredcontent requiredttlSecondsexpiresAtactionsacknowledge.followUpSentNoticeid requiredtenantId requiredchannelId requiredto requiredcontentDigest requiredcreatedAt requiredexpiresAt requiredactions requiredfollowUp requiredDeliveryState"queued" | "delivered" | "acknowledged" | "expired" | "revoked"
DeliverynoticeId requireddeviceId requiredstate requiredupdatedAt requireddeliveredAt requiredacknowledgedAt requiredackAction requiredacknowledge for a plain acknowledgement).reminders requiredlastNotifiedAtNoticeStatusid requiredexpiresAt requiredrevokedAt requiredactions requiredfollowUp requireddeliveries requiredRevokedNoticeid requireddeliveries requiredReceiptWhoid requiredname requiredrole requiredSealedReceiptOne sealed step. hash = lowercase hex SHA-256 of the UTF-8 canonical JSON of {lineId, seq, at, who, what, text, data, prev} (keys sorted by UTF-16 code unit at every depth); sig = base64 Ed25519 over the UTF-8 bytes of the 64-character hash; keyId = first 16 hex of SHA-256 over the seal key's SPKI DER. The shape of @contextual/seal.
lineId requiredseq requiredat requiredwho requiredwhat required"queued" | "delivered" | "acknowledged" | "expired" | "revoked" | "reminded"text requireddata requiredprev requiredhash requiredkeyId requiredsig requiredChainCheckobject or object
NoticeReceiptsevents requiredcheck requiredOutside the versioned notices contract; they may change between versions.
| Area | Who | Routes |
|---|---|---|
| Channels and messages | Bearer: operator or tenant token | GET /health · GET /adapters · POST /channels · GET /channels/:id · DELETE /channels/:id · POST /channels/:id/messages · GET /channels/:id/messages · POST /webhooks/:adapterId |
| Operator | Bearer: admin token | POST /admin/v1/tenants · POST /admin/v1/tenants/:t/tokens · POST /admin/v1/devices · POST /admin/v1/devices/import · POST /admin/v1/devices/:id/revoke · GET /admin/v1/tenants/:t/devices · POST /admin/v1/tenants/:t/tokens/:id/revoke · POST /admin/v1/tenants/:t/workflow-credentials/:id/revoke |
| Tenant admin | Bearer: tenant-admin token, or the operator | POST /tenants/:t/tokens · POST /tenants/:t/tokens/:id/revoke · POST /tenants/:t/devices · POST /tenants/:t/devices/:id/revoke · POST /tenants/:t/devices/:id/replace · GET /tenants/:t/devices · GET /tenants/:t/audit?format=json|csv&from=&to= |
| Devices | Signed by the device (X-Pillion-*) | GET /devices/v1/self · GET /devices/v1/notices · GET /devices/v1/notices/stream (SSE) · GET /devices/v1/notices/socket (WebSocket) · POST /devices/v1/notices/:id/received · POST /devices/v1/notices/:id/ack |
| Receipt keys | None; rate limited, cacheable | GET /receipts/v1/keys |
| Push-to-talk | Tenant admin or operator; devices sign | POST /ptt/v1/tenants/:t/channels · GET /ptt/v1/tenants/:t/channels/:id · GET /ptt/v1/tenants/:t/channels/:id/receipts · GET /ptt/v1/device/channels · POST /ptt/v1/device/channels/:id/ticket · POST /ptt/v1/device/channels/:id/spurts/:spurtId/heard · GET /ptt/v1/device/ice · GET /ptt/v1/socket?ticket=… |
| Relay | Tenant admin; postmaster signs its events | POST /relay/v1/tenants/:t/telegram/links · PUT /relay/v1/tenants/:t/sources/postmaster · POST /relay/v1/postmaster/:tenantId · POST /relay/v1/telegram/webhook |
| Pillion Fleet | Bearer: operator token of the tenant | POST /fleet/v1/admin/tenants/:t/operator-tokens · GET /fleet/v1/tenants/:t/jobs · POST /fleet/v1/tenants/:t/jobs · GET /fleet/v1/tenants/:t/jobs/:id · the console at /fleet |