API reference
The BookedMeetings engine exposes a JSON HTTP API. This page is generated from contracts/openapi.yaml, which CI checks against the running application and fuzzes with schemathesis. Every endpoint except /healthz needs a bearer token; the token decides the role (admin, ops, auditor, read-only).
curl -H "Authorization: Bearer $AV_TOKEN" https://<engine-host>/whoami
Errors share one shape: {"error": "<code>", "detail": "<message>"}. Request bodies are strict: a field of the wrong type is rejected, never coerced.
api-keys
| Method | Path | Summary | Body | Returns |
|---|
GET | /api-keys | List Keys | | ApiKeyOut[] |
POST | /api-keys | Issue Key | ApiKeyIn | IssuedKeyOut |
POST | /api-keys/{key_id}/revoke | Revoke Key | ReasonIn | ApiKeyOut |
POST | /api-keys/{key_id}/rotate | Rotate Key | ReasonIn | IssuedKeyOut |
audit
| Method | Path | Summary | Body | Returns |
|---|
GET | /audit | List Audit | | AuditEvent[] |
GET | /audit/export | Export Audit | | |
calls
| Method | Path | Summary | Body | Returns |
|---|
GET | /calls | List Calls | | CallOutcome[] |
GET | /calls/{call_id} | Get Call | | CallOutcome |
GET | /calls/{call_id}/transcript | Get Transcript | | TranscriptLine[] |
campaigns
| Method | Path | Summary | Body | Returns |
|---|
GET | /campaigns | List Campaigns | | CampaignView[] |
POST | /campaigns/{campaign_id}/pause | Pause Campaign | ReasonIn | CampaignView |
POST | /campaigns/{campaign_id}/resume | Resume Campaign | ReasonIn | CampaignView |
cli
| Method | Path | Summary | Body | Returns |
|---|
GET | /cli | List Cli | | Cli[] |
PUT | /cli/{cli_e164} | Upsert Cli | CliIn | Cli |
consent
| Method | Path | Summary | Body | Returns |
|---|
POST | /consent | Record Consent | ConsentIn | ConsentRecord |
POST | /consent/lookup | Lookup Consent | PhoneIn | ConsentRecord[] |
POST | /consent/opt-out | Opt Out | OptOutIn | ConsentRecord[] |
demo
| Method | Path | Summary | Body | Returns |
|---|
POST | /demo/killswitch | Kill | | KillSwitchResult |
POST | /demo/killswitch/release | Release | | KillSwitchResult |
POST | /demo/run | Run | RunIn | DemoRun |
handoff
| Method | Path | Summary | Body | Returns |
|---|
GET | /handoff | List Handoffs | | HandoffView[] |
GET | /handoff/{call_id} | Get Handoff | | HandoffSummary |
POST | /handoff/{call_id} | Act On Handoff | HandoffAction | HandoffSummary |
incidents
| Method | Path | Summary | Body | Returns |
|---|
GET | /incidents | List Incidents | | IncidentView[] |
POST | /incidents | Open Incident | IncidentIn | IncidentView |
POST | /incidents/{incident_id}/acknowledge | Acknowledge Incident | ReasonIn | IncidentView |
POST | /incidents/{incident_id}/reported | Mark Incident Reported | ReasonIn | IncidentView |
killswitch
| Method | Path | Summary | Body | Returns |
|---|
GET | /killswitch | Get Killswitch | | KillSwitchState |
POST | /killswitch | Set Killswitch | KillSwitchIn | KillSwitchState |
ops
| Method | Path | Summary | Body | Returns |
|---|
GET | /healthz | Healthz | | Health |
GET | /metrics | Metrics | | |
GET | /status | Status | | StatusReport |
GET | /whoami | Whoami | | WhoAmI |
rights
| Method | Path | Summary | Body | Returns |
|---|
GET | /rights-requests | List Requests | | RightsRequestView[] |
POST | /rights-requests | Open Request | RightsRequestIn | RightsRequestView |
POST | /rights-requests/{request_id}/acknowledge | Acknowledge | | RightsRequestView |
POST | /rights-requests/{request_id}/complete | Complete | CompleteIn | CompleteOut |
simulate
| Method | Path | Summary | Body | Returns |
|---|
POST | /simulate | Simulate | SimulateIn | SimulationResult |
Record schemas (BookingEvent, CallOutcome, GateDecision, HandoffSummary and others) are JSON Schema 2020-12 files in contracts/schemas/; Python and TypeScript types are generated from them and CI fails on drift.