Eleven events, one envelope
Every event arrives in the same CloudEvents envelope. Read the envelope fields, then pick an event to see its own sample. Delivery rules are on the webhooks page and a first end-to-end try is in the quickstart. Every page is listed on the developers page.
- Format
- CloudEvents 1.0, structured JSON.
- Required fields
- specversion, id, source and type; BirAsistan also requires time, subject, datacontenttype, dataschema, tenantid, traceid and data.
- Naming
- Envelope fields are lowercase letters and digits (tenantid). Data fields are camelCase (tenantId, callId).
- Delivery
- A signed HTTPS request. The signature header is explained on the webhook page.
Envelope fields
First the eleven envelope fields. The table below shows when each event arrives and what the receiver should do; its sample envelope opens in its own row. Sample identifiers are visibly made up.
specversion- CloudEvents version. Always 1.0.
id- The event's identity. It does not change when the same event is delivered again; a new corrective event gets a new one.
source- The system that produced the event. It carries no internal address or credential.
type- The fixed meaning of the event, for example call.ended.
time- When the event happened. The delivery time is a separate HTTP header.
subject- The kind and opaque identity of the resource, for example calls/<id>.
datacontenttype- Data format: application/json.
dataschema- Points at the data schema and its version; the version is the v1 at the end of the address.
tenantid- The account the event belongs to. Check that a received event matches your account.
traceid- Trace identity. Share it when you ask for support; it is not a source of permission.
data- The event-specific data. Each type is validated only against its own schema.
Pick an event
| Pick an event | When it arrives | What the receiver does |
|---|---|---|
call.started | Call record is opened. | Open the call timeline. |
call.answered | The call is answered. | Work out the time to answer. |
call.ended | The call ends. | Read the technical ending (terminationReason) and the business result (businessOutcome) separately. |
call.transfer.requested | A transfer is requested. | Show the transfer as pending. |
call.transfer.completed | A transfer completes. | Mark that a person took over the call. |
call.transfer.failed | A transfer fails. | Follow the fallback. |
recording.ready | A recording is ready; its status can be ready or partial. | Reach the recording through the authenticated API; the event carries no download address. |
transcript.ready | A transcript is ready. | Fetch the text from the API; contentRevision tells which revision it is. |
ticket.created | A support ticket is created. | Sync the ticket to your customer system. |
callback.requested | A callback is requested. | Open a task. |
usage.finalized | A usage period is finalized. | Start invoice preparation. |
Sample envelope
call.started
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000001", "source": "urn:birasistan:core", "type": "call.started", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-started", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "conversationId": "33333333-3333-4333-8333-333333333333", "direction": "inbound", "state": "received", "sequence": 1 }}call.answered
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000002", "source": "urn:birasistan:core", "type": "call.answered", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-answered", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "answeredAt": "2026-12-02T12:00:00Z", "mode": "ai_active", "sequence": 2 }}call.ended
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000003", "source": "urn:birasistan:core", "type": "call.ended", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-ended", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "endedAt": "2026-12-02T12:00:00Z", "outcome": "completed", "durationMs": 180000, "aiActiveMs": 95000, "humanActiveMs": 60000, "sequence": 10, "terminationReason": "completed", "businessOutcome": "solved" }}call.transfer.requested
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000004", "source": "urn:birasistan:core", "type": "call.transfer.requested", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-transfer-requested", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "operationId": "33333333-3333-4333-8333-333333333333", "targetType": "queue", "mode": "warm" }}call.transfer.completed
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000005", "source": "urn:birasistan:core", "type": "call.transfer.completed", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-transfer-completed", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "operationId": "33333333-3333-4333-8333-333333333333", "connectedLegId": "44444444-4444-4444-8444-444444444444" }}call.transfer.failed
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000006", "source": "urn:birasistan:core", "type": "call.transfer.failed", "time": "2026-12-02T12:00:00Z", "subject": "calls/22222222-2222-4222-8222-222222222222", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/call-transfer-failed", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "operationId": "33333333-3333-4333-8333-333333333333", "reason": "target_no_answer", "fallback": "return_to_ai" }}recording.ready
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000007", "source": "urn:birasistan:core", "type": "recording.ready", "time": "2026-12-02T12:00:00Z", "subject": "recording/33333333-3333-4333-8333-333333333333", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/recording-ready", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "recordingId": "33333333-3333-4333-8333-333333333333", "expiresAt": "2027-01-01T12:00:00Z", "durationMs": 180000, "status": "ready", "legalHold": false, "manifestVersion": 1 }}transcript.ready
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000008", "source": "urn:birasistan:core", "type": "transcript.ready", "time": "2026-12-02T12:00:00Z", "subject": "transcript/33333333-3333-4333-8333-333333333333", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/transcript-ready", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callId": "22222222-2222-4222-8222-222222222222", "transcriptId": "33333333-3333-4333-8333-333333333333", "language": "tr-TR", "contentRevision": 1, "kind": "original" }}ticket.created
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000009", "source": "urn:birasistan:core", "type": "ticket.created", "time": "2026-12-02T12:00:00Z", "subject": "ticket/33333333-3333-4333-8333-333333333333", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/ticket-created", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "ticketId": "44444444-4444-4444-8444-444444444444", "callId": "22222222-2222-4222-8222-222222222222", "status": "open", "priority": "high" }}callback.requested
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000010", "source": "urn:birasistan:core", "type": "callback.requested", "time": "2026-12-02T12:00:00Z", "subject": "callback/33333333-3333-4333-8333-333333333333", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/callback-requested", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "callbackId": "33333333-3333-4333-8333-333333333333", "ticketId": "44444444-4444-4444-8444-444444444444", "status": "requested" }}usage.finalized
{ "specversion": "1.0", "id": "aaaaaaaa-aaaa-4aaa-8aaa-000000000011", "source": "urn:birasistan:core", "type": "usage.finalized", "time": "2026-12-02T12:00:00Z", "subject": "usage/33333333-3333-4333-8333-333333333333", "datacontenttype": "application/json", "dataschema": "https://docs.birasistan.com/schemas/v1/usage-finalized", "tenantid": "11111111-1111-4111-8111-111111111111", "traceid": "0123456789abcdef0123456789abcdef", "data": { "tenantId": "11111111-1111-4111-8111-111111111111", "usageBatchId": "33333333-3333-4333-8333-333333333333", "periodStart": "2026-12-01T00:00:00Z", "periodEnd": "2026-12-02T00:00:00Z", "quality": "measured" }}Order and repeats
Events can arrive out of order or repeated. The receiver plans for that from the start.
- No ordering guarantee
- Ordering is not a general guarantee. Events of the same call can carry a sequence number. A late call.started does not undo the state set by call.ended.
- A missing event
- If an event is missing, fetch the current state from the API. Do not build records on the event stream alone.
- The same event twice
- On redelivery the id stays the same and so does the body. A valid signature does not show that the event was not processed before; recognize it by id.
- A corrective event
- A new event that corrects an earlier one has a new id.
What an event does not carry
Events carry minimal data. Content is fetched from the API so that your webhook logs do not turn into a store of personal data. The way to read the content is described on the REST API page.
- Raw audio
- No event carries audio; the recording-ready event only reports the recording id.
- Transcript text
- The transcript-ready event reports the id and revision; the text is fetched from the API.
- Secrets
- No event contains an API key or a webhook secret.
- Signed download address
- A download address does not come with the event; an authorized receiver asks the API for it.