Worked organizations samples
The endpoint list below documents every operation’s parameters; this overlay walks the two operations a billing-conscious integration actually uses: read the monthly SLA report → read any owed SLA credit → mint the re-auth challenge when the caller needs the irreversible DELETE. Success envelopes are{ data, meta }, error envelopes { error, meta } — see
How to read a worked sample. Every request
uses your tenant-scoped API key (X-API-Key); the SLA report is an
org-admin read, and the re-auth challenge is owner-only by design.
Every response carries meta.request_id. Quote the request id when you
report a miscalculated window or a re-auth the DELETE route rejects — a
support trace needs both the window and the token id.
1. Read the monthly SLA report
GET /api/v1/organizations/sla-report returns, for one ?period=YYYY-MM
calendar month, the per-channel availability percentage, the public
incident windows that affected the tenant’s channels, and the tenant’s
per-channel delivery success rate over the period. The report is a pure
read-model over the public incident feed and the messages time-series —
the same inputs always produce the same report. Exportable as CSV with
?format=csv.
200
availability_percentis per-channel — the month minutes minus the overlapping incident minutes, pro-rated across the month boundary.- The same
inputs always produce the same output, so the CSV export is a
straight-through snapshot of the same report. Use
?format=csvto export.
2. Read any owed SLA credit
GET /api/v1/organizations/sla-report/credit applies the published SLA
credit schedule to the same report — the minutes the platform missed its
availability commitment and the corresponding owed percentage. When no
schedule applies, the returned object reports no credit.
200
3. Mint the workspace-deletion re-auth challenge
POST /api/v1/organizations/{id}/reauth-challenge mints a five-minute,
single-use token scoped to workspace_delete:<id> for the calling
owner’s organization. The irreversible landlord-scoped DELETE
rejects any hold that was not minted through this endpoint in the last
five minutes. Takes no request body; owner-only, audit-logged, idempotent
via the Idempotency-Key header. Returns 403 when the id is not the
caller’s own organization and 401 when the session has no authenticated
user.
200
DELETE /organizations/:id
consumes it and the next destruction needs a fresh mint.
4. Errors
Errors follow the{ error, meta } envelope. Two failures every caller
must handle:
403 — id is not the caller’s own organization. The endpoint returns
this before minting, so a token stolen from a session cannot mint a token
for someone else’s workspace.
403
Idempotency-Key fired
concurrently; wait for the in-flight request to land before retrying.
409