Receive
Events
Every provider speaks its own dialect. Braidport normalises all of them into one event schema, delivered to your webhook endpoints and available from GET /v1/events. The tables on this page are generated from the same schema the API validates against.
On this page
The envelope#
Every event has the same envelope; type decides the shape of data. The current api_version is 2026-11-01.
| Field | Type | Description |
|---|---|---|
id | evt_ id | Event id, evt_…. Deterministic: a retry or redelivery of the same event carries the same id. De-duplicate on it. |
api_version | string | Version of the event schema, currently the date shown above. |
created_at | timestamp | When Braidport created the event. |
test | boolean | true for sandbox and simulated events. Test events never count as usage. |
workspace_id | ws_ id | The workspace (end client) the event belongs to. null only on ping sent to an organization-level endpoint. |
channel | object | The channel the event happened on. null only on ping. |
channel.id | ch_ id | Channel id, ch_…. Use it with channel_id + to to start a conversation. |
channel.provider | "whatsapp" | "instagram" | "messenger" | "telegram" | "google" | "sandbox" | whatsapp, instagram, messenger, telegram, google or sandbox. |
channel.external_account_id | string | The provider's account id: WhatsApp phone number id, Instagram account id, Facebook Page id, Telegram bot id, Google account id; the workspace id for the sandbox. |
channel.display_name | string | Human-readable name: phone number, account or Page name, bot username. |
type | "message.received" | The event type. The data object depends on it. |
With the workspace setting include_raw on, message and status events also carry data.raw: the untouched provider payload, for the rare case the unified fields do not cover.
Event types#
| Type | When | data | Usage |
|---|---|---|---|
message.received | A contact sent a message to a channel. | { message } | Counted |
message.sent | A message went out on a channel: through the API (source: "api") or from a person outside Braidport. | { message } | Free |
message.status | An outbound message was delivered, read, played or failed. | status object | Free |
message.edited | A contact edited a message. data.message holds the new version. | { message } | Free |
message.deleted | A contact deleted a message. | { provider_message_id, conversation_id } | Free |
channel.connected | An end client connected an account through a connect link or the dashboard. | { status, previous_status, reason } | Free |
channel.disconnected | A channel was disconnected, removed at the provider or moved to another workspace. | { status, previous_status, reason } | Free |
channel.status_changed | A channel's status changed, for example to needs_reauth or back to active. | { status, previous_status, reason } | Free |
template.status_changed | Meta reviewed, paused or disabled a WhatsApp message template. | { template } | Free |
ping | Test event sent by POST /v1/webhook-endpoints/:id/test. | { endpoint_id } | Free |
Usage counts inbound message.received events and outbound sends through the API; sandbox and test events are never counted. Choose which types an endpoint receives with its events filter.
Messages#
message.received, message.sent and message.edited carry one data.message object:
{ "id": "evt_sabr24pa3eywnyp266ssm8yw9pkrdvzr2hy4wwnsg1vrbbze92xg", "type": "message.received", "api_version": "2026-11-01", "created_at": "2026-11-10T19:20:30.123Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "message": { "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAEhgUM0E", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcW00Y2Z0OHh2dHE4NWc5OHN8SVQuMTM0OTEyMDg2NTUzMDI3NDE5MTh8", "direction": "inbound", "source": null, "client_reference": null, "timestamp": "2026-11-10T19:20:29.000Z", "from": { "id": "IT.13491208655302741918", "name": "Mario Rossi", "username": null, "phone": "+393401234567" }, "type": "text", "text": "Hello, I would like to book an appointment", "attachments": [], "audio_url": null, "interactive_reply": null, "location": null, "contacts": null, "reaction": null, "share": null, "reply_to": null, "referral": null, "identity_change": null } }}| Field | Type | Description |
|---|---|---|
provider_message_id | string | The provider's message id. WhatsApp wamid.…; Telegram <chat_id>:<message_id>. |
conversation_id | cnv_ id | ≤ 2,048 charsOpaque id of the conversation with this contact on this channel. Pass it back to POST /v1/messages to reply. |
direction | "inbound" | "outbound" | inbound for message.received, outbound for message.sent. |
source | "api" | "business_app" | "page_inbox" | "other" | null | message.sent only: where the outbound message came from. api = sent through Braidport; anything else was sent by a person outside Braidport. |
client_reference | string | null | message.sent through the API: the client_reference you set on the send. |
timestamp | timestamp | When the provider says the message was sent. |
from | object | The sender. |
from.id | string | The provider's stable sender id: the WhatsApp BSUID when present (else the phone number), the Messenger PSID, the Instagram IGSID, the Telegram user id as a string. |
from.name | string | null | Display name, when the provider supplies it (Messenger needs an extra approved feature). |
from.username | string | null | Username, when the provider supplies one. |
from.phone | string | null | Phone number in international format, only when the provider supplies it. |
type | enum (13 values) | Message type: text, image, audio, video, document, sticker, location, contacts, interactive_reply, reaction, share, system or unsupported. |
text | string | null | The body, the media caption, or the title of the button the contact tapped. |
audio_url | string | null | Convenience copy of the URL of the first audio attachment. |
interactive_reply | object | null | Set when the contact tapped a button, a list row, a postback or a quick reply. |
interactive_reply.id | string | The id you gave the button or row when you sent it. |
interactive_reply.title | string | The visible title the contact tapped. |
interactive_reply.kind | "button" | "list" | "postback" | "quick_reply" | Which kind of control was tapped. |
location | object | null | Set on location messages. |
location.latitude | number | ≥ -90≤ 90Latitude in degrees. |
location.longitude | number | ≥ -180≤ 180Longitude in degrees. |
location.name | string | null | Name of the place, when shared. |
location.address | string | null | Address of the place, when shared. |
contacts | object[] | null | Set on contacts messages: the shared contact cards. |
contacts[].name | string | null | Name on the card. |
contacts[].phones | object[] | Phone numbers on the card. |
contacts[].phones[].phone | string | The number as written on the card. |
contacts[].phones[].type | string | null | Label such as CELL or WORK, when given. |
contacts[].phones[].user_id | string | null | The provider user id for this number when known (WhatsApp wa_id, Telegram user_id). |
contacts[].emails | object[] | E-mail addresses on the card. |
contacts[].emails[].email | string | The address. |
contacts[].emails[].type | string | null | Label such as HOME or WORK, when given. |
reaction | object | null | Set on reaction messages. |
reaction.emoji | string | The emoji. An empty string means the contact removed their reaction. |
reaction.provider_message_id | string | The message the reaction belongs to. |
share | object | null | Set on share messages (Instagram and Messenger). |
share.kind | "post" | "reel" | "story" | "story_mention" | What was shared or mentioned. |
share.url | string | null | Link to the shared item, when the provider supplies one. |
share.title | string | null | Title of the shared item, when the provider supplies one. |
reply_to | object | null | Set when the message quotes an earlier one. |
reply_to.provider_message_id | string | The quoted message. |
referral | object | null | Ad or link context that opened the conversation, when the provider supplies it. |
referral.source | string | null | The provider's source, lower-cased: ad, post, shortlink, … |
referral.ref | string | null | The ref parameter of the link, when present. |
referral.url | string | null | URL of the ad or post. |
referral.ad_id | string | null | The ad id. |
referral.headline | string | null | Headline of the ad. |
referral.body | string | null | Body text of the ad. |
identity_change | object | null | Type system only: the sender's provider id changed (WhatsApp user id or phone number change). |
identity_change.kind | "user_id" | "phone" | Which identifier changed. |
identity_change.previous_id | string | null | The old id, when known. |
identity_change.new_id | string | The new id. Later messages carry it in from.id. |
Message types: text, image, audio, video, document, sticker, location, contacts, interactive_reply, reaction, share, system, unsupported. Each type sets its own field (location on location, reaction on reaction, and so on); fields that do not apply are null. unsupported means the provider sent something Braidport cannot represent yet; turn on include_raw to inspect it.
Attachments
Images, audio, video, documents and stickers arrive in attachments, each with a short-lived download URL. A voice note:
{ "id": "evt_7rhyg5g075cmmcw99xjp9rdh6j5vtyg0h3a2rjpbefqaxncw02eg", "type": "message.received", "api_version": "2026-11-01", "created_at": "2026-11-10T19:21:04.410Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "message": { "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAEhgUM0F", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcW00Y2Z0OHh2dHE4NWc5OHN8SVQuMTM0OTEyMDg2NTUzMDI3NDE5MTh8", "direction": "inbound", "source": null, "client_reference": null, "timestamp": "2026-11-10T19:21:03.000Z", "from": { "id": "IT.13491208655302741918", "name": "Mario Rossi", "username": null, "phone": "+393401234567" }, "type": "audio", "text": null, "attachments": [ { "type": "audio", "url": "https://api.braidport.com/media/v1.k1.Zm9vYmFy", "mime_type": "audio/ogg", "size_bytes": 18233, "filename": null, "voice": true, "duration_seconds": 7, "transcript": null, "expires_at": "2026-11-11T19:21:04.000Z", "unavailable_reason": null } ], "audio_url": "https://api.braidport.com/media/v1.k1.Zm9vYmFy", "interactive_reply": null, "location": null, "contacts": null, "reaction": null, "share": null, "reply_to": null, "referral": null, "identity_change": null } }}The attachment fields are described in Media.
Senders and conversations
from.id is the provider's stable id for the contact, and conversation_id identifies the conversation between that contact and the channel. Use conversation_id to reply and as the key of your conversation state. It is opaque: do not parse it.
message.sent#
message.sent reports every outbound message: your own API sends (source: "api", with your client_reference) and messages a person sent outside Braidport. Sources: api, business_app, page_inbox, other.
{ "id": "evt_5syjr0x9a1xe4sfcyptkat45mmss78g2kmj1754se9jt38jtxz30", "type": "message.sent", "api_version": "2026-11-01", "created_at": "2026-11-10T19:24:12.002Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "message": { "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAERgSQjE", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcW00Y2Z0OHh2dHE4NWc5OHN8SVQuMTM0OTEyMDg2NTUzMDI3NDE5MTh8", "direction": "outbound", "source": "business_app", "client_reference": null, "timestamp": "2026-11-10T19:24:11.000Z", "from": { "id": "106540352242922", "name": null, "username": null, "phone": "+393401234567" }, "type": "text", "text": "Hi Mario, this is Giulia from the front desk. Tuesday at 10:00 works.", "attachments": [], "audio_url": null, "interactive_reply": null, "location": null, "contacts": null, "reaction": null, "share": null, "reply_to": null, "referral": null, "identity_change": null } }}When source is anything other than api, a human is talking to the contact: pause your agent. See Human handover.
message.status#
{ "id": "evt_32p3wwt3y0b8j32h1t9zjd9625mxkrzncn1p8ac31yqgjd7mz3j0", "type": "message.status", "api_version": "2026-11-01", "created_at": "2026-11-10T19:25:00.512Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAERgSQjI", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcW00Y2Z0OHh2dHE4NWc5OHN8SVQuMTM0OTEyMDg2NTUzMDI3NDE5MTh8", "status": "read", "recipient": { "id": "IT.13491208655302741918" }, "timestamp": "2026-11-10T19:24:58.000Z", "client_reference": "booking-8841" }}| Field | Type | Description |
|---|---|---|
provider_message_id | string | The outbound message this status is about. |
conversation_id | cnv_ id | ≤ 2,048 charsThe conversation of that message. |
status | "sent" | "delivered" | "read" | "played" | "failed" | sent, delivered, read, played (voice notes) or failed. |
recipient | object | Who the message was sent to. |
recipient.id | string | The recipient's provider id. |
timestamp | timestamp | When the provider recorded the status. |
client_reference | string | null | may be absentThe client_reference of the send, when you set one. |
error | object | may be absentPresent when status is failed. |
error.code | enum (35 values) | A stable Braidport error code (see Errors). |
error.provider_code | string | may be absentThe provider's numeric code, for support cases. |
pricing | object | may be absentWhatsApp pricing information, when Meta includes it. |
pricing.billable | boolean | Whether Meta bills this message to the client's WhatsApp account. |
pricing.category | string | Meta's pricing category. |
pricing.type | string | Meta's pricing type. |
raw | any | may be absentThe untouched provider payload, only when the workspace setting include_raw is on. |
Providers report different receipts. What each channel can tell you about a message you sent:
| Channel | delivered | read | played |
|---|---|---|---|
| Yes | Yes | Yes | |
| Messenger | Yes | No | No |
| No | Yes | No | |
| Telegram | No | No | No |
| Sandbox | Yes | No | No |
Messenger read receipts are not reported per message: Meta sends only a watermark (every message up to a time was read), not the ids of the messages. Messenger deliveries are reported only when Meta lists the ids of the messages delivered.
Do not wait for a delivered that a channel never sends: a successful POST /v1/messages already means the provider accepted the message. A failed status always carries error.code:
{ "id": "evt_7xwvpyt3bc2k45jhvbqx6x6drt0xr1qtmsf3ekhr6dxrhjg4dqn0", "type": "message.status", "api_version": "2026-11-01", "created_at": "2026-11-10T19:26:00.000Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "provider_message_id": "wamid.HBgMMzkzNDAxMjM0NTY3FQIAERgSQjM", "conversation_id": "cnv_djF8Y2hfMDFtNzRlNTAzcW00Y2Z0OHh2dHE4NWc5OHN8SVQuMTM0OTEyMDg2NTUzMDI3NDE5MTh8", "status": "failed", "recipient": { "id": "IT.13491208655302741918" }, "timestamp": "2026-11-10T19:25:59.000Z", "client_reference": null, "error": { "code": "recipient_unreachable", "provider_code": "131026" } }}message.edited and message.deleted#
message.edited carries the full new version of the message in data.message, with the same provider_message_id. message.deleted carries only provider_message_id and conversation_id. If your agent already answered the original, decide in your own logic whether the edit changes anything. WhatsApp reports that a message was edited but not its new text, so a WhatsApp edit produces no event.
Channel events#
channel.connected, channel.disconnected and channel.status_changed share one data shape. Channel statuses: active, pending, needs_reauth, restricted, error, disabled.
{ "id": "evt_4mqh1j1p23nwm6g5kg5tx0jnxehfjpz4t7bvsym9twj8n0psy48g", "type": "channel.status_changed", "api_version": "2026-11-01", "created_at": "2026-11-10T08:00:00.000Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "status": "active", "previous_status": "pending", "reason": null }}| Field | Type | Description |
|---|---|---|
status | "active" | "pending" | "needs_reauth" | "restricted" | "error" | "disabled" | The channel status now. |
previous_status | "active" | "pending" | "needs_reauth" | "restricted" | "error" | "disabled" | null | The status before the change; null for a new channel. |
reason | string | null | Machine-readable reason, such as claimed_elsewhere or subscription_inactive, when there is one. |
needs_reauth: the provider no longer accepts the channel's authorization, or, with the reasoncredentials_unreadable, the stored authorization can no longer be read on our side (for example after a restore). Ask the client to reconnect through their connect link. Withcredentials_unreadableyou can contact support first: we may be able to restore the stored authorization, and a following health check then drops that reason by itself: the channel usually returns toactive, possibly with a reason that check found (such aswebhook_replacedorscope_missing).restricted: the provider restricted the account; the client must resolve it with the provider.disabled: the channel no longer works, for example because the account was connected to another workspace (claimed_elsewhere), a managed Telegram bot was transferred to another owner, who must connect it again through your connect link (owner_changed), or the subscription ended (subscription_inactive).
template.status_changed#
{ "id": "evt_sm5ak1b18yvcbd7z5dyzxset42n3g99gk7qhpjk4nkpj6f4tzrmg", "type": "template.status_changed", "api_version": "2026-11-01", "created_at": "2026-11-10T09:12:44.000Z", "test": false, "workspace_id": "ws_01m74e503kmb73kwncxpsgwymm", "channel": { "id": "ch_01m74e503qm4cft8xvtq85g98s", "provider": "whatsapp", "external_account_id": "106540352242922", "display_name": "+39 340 123 4567" }, "data": { "template": { "id": "1029384756", "name": "appointment_reminder", "language": "en_US", "status": "approved", "category": "utility" } }}| Field | Type | Description |
|---|---|---|
template | object | The WhatsApp message template that changed. |
template.id | string | Meta's template id. |
template.name | string | Template name. |
template.language | string | Language code, such as en_US. |
template.status | "approved" | "pending" | "rejected" | "paused" | "disabled" | "in_appeal" | "pending_deletion" | "archived" | "limit_exceeded" | "locked" | The new review status. |
template.category | "marketing" | "utility" | "authentication" | marketing, utility or authentication. |
template.reason | string | null | may be absentMeta's reason for a rejection or pause, when given. |
Template statuses: approved, pending, rejected, paused, disabled, in_appeal, pending_deletion, archived, limit_exceeded, locked. Only approved templates can be sent.
ping#
Sent only when you test an endpoint. It is always test: true, has no channel, and has workspace_id: null on organization-level endpoints.
{ "id": "evt_namm09k4y6j1yg7bqh9ck69ypsnepdk60aarzqxa50xq3sjdp4hg", "type": "ping", "api_version": "2026-11-01", "created_at": "2026-11-10T10:00:00.000Z", "test": true, "workspace_id": null, "channel": null, "data": { "endpoint_id": "we_01m74e503qmhx9q0b5gatqq4fs" }}Polling recent events#
/v1/eventsscope readRecent events, oldest first: the most recent 200 or so events of the workspace, none older than 24 hours (needs the workspace's event buffer). A cursor that trimming has passed usually answers validation_failed with details.reason cursor_expired; after 48 hours without an event the buffer starts afresh and the gap is not reported
Besides webhooks, recent events can be read in order, which is useful for agents that poll. The buffer keeps the most recent 200 or so events of the workspace, none older than 24 hours. It needs the workspace setting event_buffer (on by default). Pass the returned next_after as after on the next call; with an organization key, pass workspace_id.
A poller that falls further behind than the buffer gets validation_failed with details.reason cursor_expired: events after its cursor are no longer kept. Call again without after to read from the oldest event kept. While a quiet workspace's buffer is empty, the answer is an empty page instead, and when the workspace had no new event for 48 hours the buffer starts afresh and the gap is not reported at all, so do not rely on cursor_expired to detect missed events. To catch up after an outage, rely on webhooks: a failed delivery is retried for about 24 hours.