Webhooks
Webhooks allow us to push raw events we collect about your emails over to your servers. Batches of events are delivered through a POST request to the defined target URL. You can use this endpoint to create and manage webhooks, or you can create one from the app.
Batch Information
Any webhook batch that does not receive an HTTP 200 response will be retried for a total of 8 hours before the data is discarded.
Each webhook batch contains the header
X-MessageSystems-Batch-ID
, which is useful for detecting and prevention of processing duplicate batches. Additionally within each event theevent_id
is unique and can also be used in duplicate detection and prevention.Webhooks posting to your endpoint will timeout after 10 seconds. For best results, write webhook batches to disk and then process asynchronously to minimize data loss if you have a problem with your database.
Webhook batch status is available for 24 hours via the UI or the API.
See Best Practices for Managing Webhook Data Streams for more information on how best to consume webhooks.
See Webhook Authentication and Security for highly recommended security measures.
Event Types
You can receive any of the following types of events in webhook payloads:
Message Status Events:
injection
: Message was accepted for deliverydelivery
: Message was successfully delivereddelay
: Message delivery was delayedbounce
: Message delivery failedspam_complaint
: Recipient marked message as spamout_of_band
: Message bounced after initial acceptancepolicy_rejection
: Message was rejected by policygeneration_failure
: Message generation failedgeneration_rejection
: Message was rejected during generation
Recipient Engagement Events:
open
: Message was openedinitial_open
: First time message was openedclick
: Link in message was clickedinitial_click
: First time a link was clickedamp_click
: Link in AMP version was clickedamp_open
: AMP version was opened
Returns a list of all your webhooks.
The ID of the workspace
GET /api/workspaces/{workspaceId}/reach/webhooks HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
Successfully retrieved webhooks list
{
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"target": "text",
"events": [
"text"
],
"auth_type": "text",
"auth_request_details": {},
"auth_credentials": {},
"last_successful": "2025-06-30T16:30:59.477Z",
"last_failure": "2025-06-30T16:30:59.477Z",
"active": true,
"links": [
{
"href": "text",
"rel": "text",
"method": [
"text"
]
}
]
}
]
}
Create a new webhook. When a webhook is created, a test POST request is sent to the target URL. If this request does not receive an HTTP 200 response, your request will fail with HTTP 400 and the webhook will not be created. If created successfully, the webhook will begin to receive event data after 1 minute.
The ID of the workspace
Name for webhook
URL of the target to which to POST event batches
Array of event types this webhook will send
The status of the webhook
true
Object of custom headers to be used during POST requests to target
Type of authentication to be used during POST requests to target
none
Possible values: POST /api/workspaces/{workspaceId}/reach/webhooks HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 207
{
"name": "text",
"target": "text",
"events": [
"text"
],
"active": true,
"custom_headers": {},
"auth_type": "none",
"auth_request_details": {
"url": "text",
"body": {}
},
"auth_credentials": {
"username": "text",
"password": "text"
}
}
{
"results": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"links": [
{
"href": "text",
"rel": "text",
"method": [
"text"
]
}
]
}
}
Retrieve a specific webhook by ID.
The ID of the workspace
The ID of the webhook
GET /api/workspaces/{workspaceId}/reach/webhooks/{webhookId} HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
Successfully retrieved webhook
{
"results": {
"name": "text",
"target": "text",
"events": [
"text"
],
"auth_type": "text",
"auth_request_details": {},
"auth_credentials": {},
"active": true,
"links": [
{
"href": "text",
"rel": "text",
"method": [
"text"
]
}
]
}
}
Update an existing webhook. If you change the target URL, a test POST request will be sent. If this request does not receive an HTTP 200 response, your request will fail with HTTP 400.
The ID of the workspace
The ID of the webhook
Name for webhook
URL of the target to which to POST event batches
Array of event types this webhook will send
The status of the webhook
Object of custom headers to be used during POST requests to target
Type of authentication to be used during POST requests to target
Object containing details needed for OAuth 2.0 authentication
Object containing credentials for Basic Authentication
PUT /api/workspaces/{workspaceId}/reach/webhooks/{webhookId} HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 150
{
"name": "text",
"target": "text",
"events": [
"text"
],
"active": true,
"custom_headers": {},
"auth_type": "none",
"auth_request_details": {},
"auth_credentials": {}
}
{
"results": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"links": [
{
"href": "text",
"rel": "text",
"method": [
"text"
]
}
]
}
}
Delete a specific webhook by ID.
The ID of the workspace
The ID of the webhook
DELETE /api/workspaces/{workspaceId}/reach/webhooks/{webhookId} HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
Webhook deleted successfully
No content
The validation request sends an example message event batch to the target URL, validates that the target responds with HTTP 200, and returns information on the response received.
The ID of the workspace
The ID of the webhook
POST /api/workspaces/{workspaceId}/reach/webhooks/{webhookId}/validate HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
Webhook validation successful
{
"results": {
"msg": "text",
"response": {
"status": 1,
"headers": {},
"body": "text"
}
}
}
Get status information about webhook batches. Status information is provided for failed batches and those that succeeded on retry. Batch status is available for 24 hours.
The ID of the workspace
The ID of the webhook
Maximum number of results to return
1000
GET /api/workspaces/{workspaceId}/reach/webhooks/{webhookId}/batch-status HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
Successfully retrieved batch status information
{
"results": [
{
"batch_id": "text",
"ts": "2025-06-30T16:30:59.477Z",
"attempts": 1,
"response_code": "text",
"failure_code": "text",
"latency": 1
}
]
}
Was this helpful?