Message status and interactions
Messages go through a life-cycle when being processed; life-cycle events provide an indication of the current status a message has; sending_failed
or delivered
are both examples of messages' status events.
Once a message is successfully delivered to its intended receiver, it may (based on the service and condition) generate associated interactions; opened
and reported-as-spam
are both examples of message interactions.
Message Lifecycle Events
You can create a webhook subscription to listen to channel message events (see API details here)
Channels supports two message lifecycle event webhook types:
<channel>.inbound
<channel>.outbound
<channel>.inbound
This event is used to receive incoming messages.
The message status can be:
delivered
When an incoming message is created with status
delivered
The message direction will be:
incoming
This event is available for the following channels:
sms
whatsapp
email
line
instagram (including comments and mentions)
facebook
line
viber
linkedin
tiktok
apple business chat
telegram
Filter channel ID
By default, when creating a subscription without specifying any filter, you are going to receive all incoming messages for all channels of that platform e.g WhatsApp
Is it possible to add filters to only receive events for a specific channel ID .
For each subscription, it is only possible to add one channelId filter.
Example event
Property | Description | Example value |
---|---|---|
service | The MEP service which generates the event | channels |
event | The specific event you are subscribing too. For channels events are scoped to all channels for a specific platform e.g. WhatsApp | whatsapp.inbound |
url | The webhook endpoint | https://site |
signingKey | A value that will be used to validate a webhook | key |
eventFilters[] | Event filters are inclusive, which means you will only get events for filters you add. If you do not add a filter you will get all events (except where you have other webhooks with an explicit filter). | { "key": "channelId", "value": "<id>" } |
Example payload
<channel>.outbound
This event is used to receive status updates for outgoing messages. The following statuses are currently supported.
The message status can be:
accepted
When an outgoing message has been
accepted
by the channels, API and will be processed by Bird
sent
When an outgoing message changes status to
sent
meaning it was processed successfully and handed to a downstream entity or carrier for delivery.
SENT
is a temporary status that will be updated to either final failure or delivery once carrier-generated events are received and processed. Many carriers process status reports asynchronously, so while a message marked as SENT may have already been delivered, the delivery confirmation hasn't yet been received from the downstream carrier."
sending_failed
When an outgoing message changes status to
sending_failed.
This indicates a failure in the Bird platform, and the message was never submitted to a downstream carrier for delivery.
delivered
When an outgoing message changes status to
delivered.
Delivered is a final status and indicates a message has reached its final destination.
Downstream carriers handle delivery reports differently. A DELIVERED
status might mean the message reached the final recipient or just the last delivery network. Not all platforms or carriers provide reports for delivery to the final recipient; final network reports are standard. In such cases, the message could still be blocked or dropped during the "last mile" to the recipient.
delivery_failed
When an outgoing message changes status to
delivery_failed
following a failure to deliver downstream of Bird's platform.
The message direction will be:
outgoing
This event is available for the following channels:
sms
whatsapp
email
line
instagram (including comments and mentions)
facebook
line
viber
linkedin
tiktok
apple business chat
telegram
Filter channel ID
By default, when creating a subscription without specifying any filter, you are going to receive all incoming messages for all channels of that platform e.g WhatsApp
Is it possible to add filters to only receive events for a specific channel ID .
For each subscription, it is only possible to add one channelId filter.
Filter messageStatus
For each subscription, it is possible to add none or multiple filters for the messageStatus
.
If the filter is not added, all statuses will be sent. If multiple status filters are added, a webhook will be sent everytime a specified status value is matched.
Example
Property | Description | Example value |
---|---|---|
service | The MEP service which generates the event | channels |
event | The specific event you are subscribing too. For channels events are scoped to all channels for a specific platform e.g. WhatsApp | whatsapp.outbound |
url | The webhook endpoint | https://site |
signingKey | A value that will be used to validate a webhook | key |
eventFilters[] | Event filters are inclusive, which means you will only get events for filters you add. If you do not add a filter you will get all events (except where you have other webhooks with an explicit filter). | { "key": "channelId", "value": "<id>" }, { "key": "messageStatus", "value": "delivered" } |
Example payload
Here you can find an example of a WhatsApp event
sms.outbound events also include the message body in each webhook except when sent as a part of a campaign, when the template ID will be used instead. For other channels, the body is not included
Here an SMS example
Message Interactions
In addition to message lifecycle events, specific customer actions on a message also lead to message interactions.
To check if a message has any interactions, you can query a specific message using the following endpoint
The following interactions are currently possible
Interaction | Description | Supported platforms |
---|---|---|
read | A user has read a message | WhatsApp, Facebook, Instagram, Line |
opened | A user has opened a message | |
clicked | A user has clicked a link or clicked a quick reply button | Email, WhatsApp, Facebook, Instagram, Line |
reported-as-spam | A user has reported a message as spam | |
unsubscribe-request | A user has requested to unsubscribe from messages | |
delete-request | A user has deleted the recieved message | - |
reaction | A user has reacted (or unreacted) to a message with an emoji | WhatsApp, Facebook, Instagram |
invalid | Invalid status | - |
<channel>.interaction
This event is used to receive interactions on a message.
The interaction type can be:
read
opened
clicked
reported-as-spam
unsubscribe-request
delete-request
reaction
This event is available for the following channels:
sms
whatsapp
email
line
instagram (including comments and mentions)
facebook
line
viber
telegram
By default, when creating a subscription without specifying any filter, you are going to receive all interaction events for all channels of that platform.
Is possible to add filters to only receive interaction for a specific channel ID and specific interaction type.
Filter channel ID
By default, when creating a subscription without specifying any filter, you are going to receive all incoming messages for all channels of that platform e.g WhatsApp
Is it possible to add filters to only receive events for a specific channel ID .
For each subscription, it is only possible to add one channelId filter.
Filter by interactionType
For each subscription, it is possible to add none or multiple filters for the interactionType
.
If the filter is not added, all interactions will be sent. If multiple interaction filters are added, a webhook will be sent everytime a specified interaction type is matched
Example
Property | Description | Example value |
---|---|---|
service | The MEP service which generates the event | channels |
event | The specific event you are subscribing too. For channels events are scoped to all channels for a specific platform e.g. WhatsApp | whatsapp.outbound |
url | The webhook endpoint | https://site |
signingKey | A value that will be used to validate a webhook | key |
eventFilters[] | Event filters are inclusive, which means you will only get events for filters you add. If you do not add a filter you will get all events (except where you have other webhooks with an explicit filter). | { "key": "channelId", "value": "{id>" }, { "key": "interactionType", "value": "reaction" }, { "key": "interactionType", "value": "read" } |
Example payload
Last updated