Use it
Response API and outbound events
An administrator configures service-account clients and approved recipients under Settings → Integrations → API clients. Paging remains OFF. These APIs coordinate response beside your existing pager; they do not execute runbooks, production actions, AI requests or Terraform plans.
Client lifecycle and authority
In API clients, follow Add a service first if the workspace has no services. Click Add client if the form is closed. Enter a name, choose a service and set the permissions the client needs, then click Create client. Oncall generates a private key and shows it once. Click Copy, save the key in your client's private secret store, then click Done.
To replace the key, open Client actions for the client, click Rotate followed by its name, then confirm with Rotate key. Oncall generates a new key. Copy and store it before clicking Done, then update your client to use it. Rotation invalidates the old key immediately and holds queued work under its former credential revision.
Storage holds only the key's SHA-256 digest. No read, archive, audit or log returns the key. Last use is visible. Revocation takes effect on subsequent requests and dispatch checks. The creating administrator must remain an active administrator. Demotion or removal suspends the key and endpoint on the next request and at dispatch. Custody stays with the creating administrator. No token creates a human session or gives member-management, archive, review-acceptance or paging authority.
Use Authorization: Bearer <private-key> on /api/v1/…. Cookie-only requests are refused. Session-protected management remains under /api/automation; it requires same-origin requests and a current administrator. Tokens do not enter those doors.
Each permission is explicit: services:read, services:write, schedules:read, schedules:write, incidents:read, incidents:write, actions:read, actions:write, analytics:read, integrations:read, responders:read. Service grants name existing service IDs. A client can update granted services; an administrator creates services and expands grants by provisioning a new client. Direct IDs, filters, pagination, linked alerts and dependencies cannot widen a grant. Client and endpoint metadata is administrator-only.
Agent policy prerequisite
Set agent policy before API clients can read or change records. Grants alone do not open the API: service-account requests follow the same agent policy as other agent doors. In a standalone installation, an owner or administrator follows Set agent policy from the API client page to Agent policy at /agents, chooses an answer for every displayed class and the paid-AI question, then saves the policy. For a Business-managed installation, that link opens the Business policy settings; the Business owner sets it there. No answer is chosen automatically. Choose the decisions your installation requires; a blocked or approval decision still restricts a request even after setup is complete.
A saved guided policy reopens through Edit policy with its answers filled in. The advanced policy document remains available; policies with scoped rules or other settings the choices cannot preserve open that document with an explanation.
The client page shows whether the policy is unset, set, paused or expired before and after client creation. After saving a policy that allows the read, use the same key with GET /api/v1/incidents: it returns only incidents in the client's granted services. Policy setup never expands a permission or service grant.
Version 1 HTTP reference
GET /api/v1/{services,schedules,incidents,actions,analytics,integrations,responders} returns {data, nextCursor}. Lists accept limit (1–100; default 25), cursor and service. Cursors are signed, bound to the client, permission revision, family and filter, and expire if the authorized records change. There is no global or hidden-service count. GET /api/v1/<family>/<id> returns an authorized record with an ETag; unknown and foreign IDs both return 404. Analytics contains incident/open/follow-up counts per granted service, not pager delivery or human-response measurements. Integration state contains secret-free native, compatible/monitoring, change and email definitions within the grant.
POST /api/v1/{services,schedules,incidents,actions} requires an opaque Idempotency-Key of at most 100 letters, digits, underscores or hyphens. Identical retries return the original operation receipt with 200; new mutations return 201. A changed body under the same key conflicts. Receipts retain operation ID, client, service, resource, entity, revision and time; request and key digests cannot execute work. A replay never repeats the mutation. Each installation retains at most 1,000 API mutation receipts for its lifetime. There is no pruning, rolling window or automatic recovery from this limit. Once full, new machine mutations return 429 without changing incident state; an authorized identical idempotent retry still returns its original receipt. Human sessions never consume these receipts and are never subject to this machine-write limit.
| Family | Accepted mutation |
|---|---|
| services | type: "service", existing id, current etag without quote characters, name, immutable environment, responder owner, runbook array, pager URL or empty string, optional in-scope dependencies. |
| schedules | Existing schedule schema: id, name, granted service, revision (0 creates), timezone, validFrom, nullable validUntil, primary, backup, overrides. Calendar-day and explicit ambiguity rules remain those in Schedules. |
| incidents | type: "declare", service, title, summary, severity and optional same-service alerts; or type: "transition", incident, current revision, state, summary, and recovery evidence URL where required. A machine acknowledgment also requires an explicit active responder member. reassign takes member and reason; assign-role also takes role. |
| actions | type: "action", incident, current incident revision, title, active responder owner, UTC calendar due, optional priority, completionPolicy and escalationRecipient. complete accepts an action and evidence URL only under the evidence policy. Human-review acceptance remains session-only. |
For example, send this body to POST /api/v1/incidents with the authorization and idempotency headers:
{"type":"declare","service":"your-service-id","title":"Checkout unavailable","severity":"warning","summary":"Investigating the checkout failure"}Use the returned entity to read the incident. Before acknowledging, grant Responders · Read (responders:read) when creating the client, then call GET /api/v1/responders with the same bearer key. It returns paginated active responders and administrators as {id, name} only; it grants no member-management or human-session authority. These workspace responders are the people the client may name for an incident in its granted services. Select the responsible person's id from that response; never guess an identifier. The lookup follows agent policy for sensitive information as well as ordinary reads. Inactive members, viewers and stakeholders are excluded; acknowledgment checks active eligibility again at mutation time.
To acknowledge, send its current revision, type: "transition", state: "acknowledged", a summary and the explicitly selected responsible member, using a new idempotency key:
{"type":"transition","incident":"entity-from-creation","revision":1,"state":"acknowledged","member":"id-from-responders","summary":"Taking responsibility for checkout"}The timeline attributes the action to the service-account ID and records the named responder separately. Later reassignment, a new commander or resolution leaves that acknowledgment entry intact. The permanent audit keeps the service-account actor and a random pseudonymous reference to the named member, never the member’s display name. Subject erasure severs the member association and scrubs the timeline reference without rewriting the permanent audit fact. This is a machine coordination action, never proof that the person responded. Recovery still requires an evidence URL and resolution a summary; service-account attribution does not turn evidence into independent verification.
Errors use {error: {code, message}}: 400 invalid_request, 401 invalid_token, 403 insufficient_scope, 404 not_found, 409 conflict, 413 request_too_large, 429 rate_or_capacity_limit, 503 storage_unavailable. Each client has 60 requests per minute, with Retry-After on exhaustion. JSON bodies are bounded to 64 KiB. State, idempotency receipt, enqueue and permanent audit commit in one storage transaction; a storage failure confirms no success. After a lost response, retry the same key.
The shared agent door can also return 403 policy_unset with the message Set agent policy before API clients can read or change records. Follow fields.setup_url to the supported policy setup described above. A paused installation returns 403 agents_paused; a blocked decision returns 403 policy_blocked; an expired Business policy returns 503 policy_unavailable. An operation waiting for approval returns 202 approval_required with its approval details. These decisions apply within the client's existing grants; an ungranted read remains 403 insufficient_scope, and a revoked key remains 401 invalid_token.
Recipient approval and signing
An administrator chooses the exact HTTPS recipient, its receiving client and service subset, and explicitly approves the minimal data categories. Recipients currently require globally routable IPv4 literals on port 443 and a path of letters, digits, slash, underscore or hyphen. Hostnames, IPv6, private/reserved addresses, userinfo, query capabilities and redirects are refused. Hostnames are refused without a DNS lookup; no DNS lookup or live DNS-rebinding defense is claimed. The receiver must present a valid TLS certificate for its public address. No production receiver is bundled or claimed as tested.
A separate random shared signing key is sealed with installation-local AES-GCM custody. The receiving client must retain incidents:read and access to that service. The originating client, receiver, endpoint and named administrators are checked again at dispatch, including credential revisions. Rotate/revoke can stop queued work. Bytes already sent cannot be recalled; a revocation during the send leaves an uncertain result. All credential material is omitted from exports.
Trigger, acknowledgment, reassignment, resolution, role and follow-up events carry only operationId, type, service, incident, revision, state, and at. Payload bytes are frozen with the original domain commit; no names, summaries, notes, evidence URLs, telephone numbers or human identity are sent.
Request headers are X-Oncall-Operation, X-Oncall-Timestamp (Unix seconds) and X-Oncall-Signature (lowercase HMAC-SHA256 hex of timestamp + "." + exactBody). Verify the signature and a five-minute timestamp window before acting. Persist the operation ID and receiver action atomically, and deduplicate that ID permanently within your event retention policy.
The receiver returns a receipt to prove authenticated acceptance:
- HTTP 2xx,
X-Oncall-Result: accepted, andX-Oncall-Receiptequal to HMAC-SHA256 hex ofoperationId + "." + requestTimestamp + ".accepted"records sent. This is receiver acceptance, never human acknowledgment. - HTTP 429 or 503 with a similarly signed
retryresult certifies that no receiver action committed and records failed, with a future due time. Only send this result if retry is safe. - Redirects and HTTP 401/403/404/410 record terminal. Redirects are never followed.
- Timeout, disconnect, unsigned success and ambiguous responses record uncertain. They are never automatically retried.
Durable delivery and recovery
At most 1,000 unfinished operations (queued, sending, failed) occupy delivery slots. Completed and stopped history does not count. When all slots are occupied, a human command still commits exactly once with its audit fact and one durable terminal outcome per approved recipient, reason capacity-not-scheduled, zero attempts, the original operation ID, owner, due time and frozen payload. This outcome means no send was scheduled, not receiver acceptance. It consumes no delivery slot and never sends automatically. Existing work is neither evicted nor duplicated. An administrator can authorize replay after a slot becomes available; replay at full capacity returns 429 and leaves the retained outcome unchanged, except a retryable failed operation can reuse the slot it already occupies.
History is never pruned. It is stored separately from the 1 MB authored-workspace profile so delivery history cannot exhaust that profile. Archive validation retains field/history bounds and all reference and credential checks, and bounds outcomes to one per endpoint and incident timeline entry rather than 1,000 lifetime rows. Native restore retains its 2 MB request limit; checkpoint restore retains its existing larger envelope and the CLI 7 MiB input limit. Use streaming rer export / rer import for larger retained histories. Storage failure still rolls back the incident, event outcomes and permanent audit fact atomically.
Hosted scheduling checks due work each minute, processing at most ten operations sequentially. A delivery has a 30-second durable lease and a 10-second network deadline. Signed retry refusals back off exponentially, with five total attempts per operation. Expired leases become uncertain because a receiver may already have committed. Local installations can use the protected Dispatch next due event action; closing the browser cannot remove queued history. The scheduler handles only this outbox and never starts paging.
Inspect named owner, due time, attempts and the complete outcome history before Authorize replay. Reauthorize changed clients/recipients first. Replay retains the same operation ID and frozen payload and does not repeat the incident mutation. A five-attempt terminal operation cannot be replayed; investigate the receiver and coordinate explicitly.
Native archives, checkpoints and portable CLI exports retain definitions, machine attribution, operations and exact delivery history. Tokens, signing ciphertext and receiving authority do not transfer. Restored clients/endpoints are inactive; queued/failed work becomes interrupted, sending work uncertain, and every operation is held. Fresh deliberate key provisioning, recipient approval and protected replay are required before any restored event can send. Erasing an imported person removes matching automation labels and credentials in the same erasure transaction; older native archives and checkpoints are refused whole under the durable subject erasure fence, with no state or session change. Current checkpoints still restore and preserve that fence. Installation archives carry the same digest custody and portability journal; a fresh destination needs the later journal to know a later erasure. Permanent pseudonymous audit facts stay immutable.
Maintained tests use real emitted Worker HTTP and local D1 storage with a receiver fake only at the network edge. They establish protocol and local durability, not live provider delivery, hosted scheduling latency, real TLS receiver compatibility, a human response or paging readiness.
Recorded on-call notifications
An accepted alert on a service with a saved paging policy uses its adopted or native rota's primary at admission when there is no explicit routing assignee. An automatically declared incident receives that assignee and its Lead remains unassigned until a person takes responsibility. With no matching coordination rule or saved paging policy, an alert is assigned when the service's rotas identify one eligible primary at admission. That assignment records ownership only. Suppression and historical replay never start a notification run.
Administrator sessions can replace a member's native settings at POST /api/members/:id/notification-rules; signed-in members can inspect them with GET at the same address. Submit {revision, contacts, rules}. Each contact has {id, type, label, address, countryCode}: type is email, phone or sms; email uses countryCode: null, while phone/SMS use an integer calling code and national digits. Each rule has {id, contact, delayMinutes, urgency}; contact names a contact in the same replacement, delay is 0–1440 minutes, and urgency is high or low. Settings use revision 0 initially and the returned revision on later edits. Contacts are unverified recorded destinations. Import adoption never silently converts foreign contact notes into these native settings.
Paging policies accept optional secondStep: "primary" | "backup"; omission preserves backup. Admission retains the policy's revision, waits, retry setting and attempt limit. Step one records the selected person's matching urgency rules, including their delays. After primaryWaitSeconds, step two selects the configured role on the policy's rota at that boundary. After backupWaitSeconds more, the run completes. Rule delays outside their step's wait are stopped. The minute task records due items once; it does not send or retry provider requests. An acknowledgment, human closure, incident recovery/resolution or source recovery stops pending items. Restoring a coordination archive holds runs and member settings inactive.
GET /api/on-call/notifications, optionally filtered with ?incident=ID or ?alert=ID, retains each recipient, contact/rule snapshot, due time, recording time and outcome. Missing coverage or matching rules is an explicit operator-action gap. Every run has paging OFF and sender none; a recorded notification is never accepted or delivered mail, SMS, voice or push. No production paging jobs, receipts or callbacks are created. Keep the existing pager authoritative.
— Run Edit Run fleet, 2026-11-15