Webhook subscription logs
Webhook logs regarding failures are available for our customers for seven days. You can check information such as how many attempts were executed, the request/response body, the final execution status and more. The following endpoints are available to interact with the logs.
Note: if you have more than 10 webhook logs, the results may be paginated. To know more about how to use the nextPageToken to get the following results, refer to this pagination documentation.
GET
/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}/logs
This endpoint allows you to list all logs for a webhook subscription. You can filter the logs by execution status.
Parámetros de consulta
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
executionStatus
string
The execution status of a webhook.
Possible values: succeeded, failed
Cuerpo de la respuesta
results
array of object
Mostrar atributos secundarios
results.requestId
string
The requestId associated with the webhook log.
results.attemptCount
integer
obligatorio
The number of times the webhook has been attempted.
example: 1, 2, 3
results.httpStatusCode
integer
obligatorio
The HTTP status code returned by the webhook.
example: 200, 400, 500
results.executionStatus
string
obligatorio
Possible values: succeeded, failed
results.createdAt
string
obligatorio
nextPageToken
string
The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.
Ejemplo de código
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}/logs' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'GET
/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}/logs/details
This endpoint allows you to get the details of a webhook log using the request ID.
Parámetros de consulta
requestId
string
The ID of the webhook event delivery request. This can be found on the header of the notification event delivery attempt with the key messagebird-request-id.
Cuerpo de la respuesta
results
array of object
The list of webhook logs with details, such as the body and the response, for each delivery attempt.
Mostrar atributos secundarios
results.requestId
string
The requestId associated with the webhook log.
results.attemptCount
integer
obligatorio
The number of times the webhook has been attempted.
example: 1, 2, 3
results.httpStatusCode
integer
obligatorio
The HTTP status code returned by the webhook.
example: 200, 400, 500
results.executionStatus
string
obligatorio
Possible values: succeeded, failed
results.createdAt
string
obligatorio
results.payloadDetails
object
Mostrar atributos secundarios
results.payloadDetails.response
string
The response body of the webhook delivery attempt request.
results.payloadDetails.request
string
The request body of the webhook delivery attempt webhook request.
Ejemplo de código
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}/logs/details' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Let's establish some of our data that will be used in the following examples:
- Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352
- Webhook subscription ID: 0edf722b-93b4-4451-8a5d-4fafba5cdf8b
- AccessKey: abcd
Retrieving logs for debugging
In this example, we retrieve all logs for a subscription. It will show information such as the request ID and how many attempts were executed to try to deliver the event succesfully. With that information, you can get more details, such as the request body and response and more. We show how to do that in our next example.
Ejemplo de código
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/webhook-subscriptions/0edf722b-93b4-4451-8a5d-4fafba5cdf8b
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd"Ejemplo de código
{
"nextPageToken": "WzE3MzI1NTk1MTk2ODYsIjk3ZDdmOGY2LTc3N2EtNGY3ZC04NTYxLWFmMDJiZjFjN2I2MSJd",
"results": [
{
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"subscriptionId": "0edf722b-93b4-4451-8a5d-4fafba5cdf8b",
"requestId": "56878366-5417-414d-b1d9-5f250354f8d1",
"attemptCount": 7,
"httpStatusCode": 429,
"executionStatus": "failed",
"createdAt": "2024-11-26T10:05:07.083Z",
"updatedAt": "2024-11-26T10:05:07.083Z"
},
{
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"subscriptionId": "0edf722b-93b4-4451-8a5d-4fafba5cdf8b",
"requestId": "97d7f8f6-777a-4f7d-8561-af02bf1c7b61",
"attemptCount": 36,
"httpStatusCode": 429,
"executionStatus": "failed",
"createdAt": "2024-11-25T18:31:59.686Z",
"updatedAt": "2024-11-25T18:31:59.686Z"
}
]
}Retrieving details about logged requests
Using the details route, you can get more information about the failures to deliver events. When querying a request ID (which can be found on the header of a request), you can obtain information about all delivery attempts. In the response example below, if there were 36 attempts, you would see 36 log details about each attempt.

Ejemplo de código
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/webhook-subscriptions/0edf722b-93b4-4451-8a5d/logs/details?requestId=56878366-5417-414d-b1d9-5f250354f8d1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {{token}}"Ejemplo de código
{
"results": [
{
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"subscriptionId": "0edf722b-93b4-4451-8a5d-4fafba5cdf8b",
"requestId": "56878366-5417-414d-b1d9-5f250354f8d1",
"attemptCount": 36,
"httpStatusCode": 429,
"executionStatus": "failed",
"createdAt": "2024-11-25T18:32:46.962Z",
"updatedAt": "2024-11-25T18:32:46.962Z",
"payloadDetails": {
"response": "<!DOCTYPE html>\n<html>\n<head>\n <title>Error: Request limit exceeded. Sign up to unlock more requests.</title>\n <link href=\"https://cdn.example.com/css/app.css\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"container\" style=\"padding: 50px\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <h1><img src=\"https://cdn.webhook.site/icon.png\" alt=\"Logo\" style=\"width:40px; margin-top: -5px\">\X</h1>\n\n <p class=\"lead\">Request limit exceeded. Sign up .</p>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-4 col-sm-offset-4 text-center\">\n <p>\n You have been rate limited due to too many requests to this URL.\n This is either because you have not purchased\n, or the endpoint has a rate limit.<br>\n <br>\n To remove the request limit limit.\n <br><br>\n If you are already subscribed and getting this error, please <a href=\"https://</a>.\n <br><br>\n <a class=\"btn btn-lg btn-success\" href=\"/register\">Sign Up Now</a>\n </p>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 40px\">\n <div class=\"col-sm-12 text-center\">\n <p class=\"small\"><a href=\"/\">\n <i class=\"bi-house-fill\"></i> Home</a>\n  \n <a href=\"/control-panel\">\n <i class=\"bi-gear-fill\"></i> Control Panel</a>\n  \n <a href=\"/register\">\n <i class=\"bi-person-add\"></i> Create Account</a>\n  \n\n <a href=\"/login\">\n <i class=\"bi-door-open-fill\"></i> Login</a></p\u003e\n <br>\n </div>\n </div>\n</div>\n</body>\n</html>\n",
"request": "{\"service\":\"channels\",\"event\":\"sms.outbound\",\"payload\":{\"id\":\"cb66df55-a060-4f37-be91-c8b8b4c4221e\",\"channelId\":\"8652c8f7-11e2-5f63-a03f-f2998f8bc6f5\",\"sender\":{\"connector\":{\"id\":\"e60a0e31-bb8f-4d56-97e7-3e50b157512d\",\"identifierValue\":\"+12345678\"}},\"receiver\":{\"contacts\":[{\"id\":\"34f282bf-7e19-4224-a1a7-05a63e4cfac9\",\"identifierKey\":\"phonenumber\",\"identifierValue\":\"+123456789\",\"countryCode\":\"NL\"}]},\"body\":{\"type\":\"text\",\"text\":{\"text\":\"help\"}},\"meta\":{},\"reference\":\"\",\"parts\":[{\"platformReference\":\"cb66df55-a060-4f37-be91-c8b8b4c4221e:b2d7a013-86df-4aa7-8245-8f3715c87ae2\"}],\"status\":\"sent\",\"validity\":129600,\"reason\":\"\",\"direction\":\"outgoing\",\"chargeableUnits\":1,\"lastStatusAt\":\"2024-11-25T10:30:00.39Z\",\"createdAt\":\"2024-11-25T10:29:59.757Z\",\"updatedAt\":\"2024-11-25T10:30:00.39Z\",\"batchId\":null}}"
}
},
{
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"subscriptionId": "0edf722b-93b4-4451-8a5d-4fafba5cdf8b",
"requestId": "56878366-5417-414d-b1d9-5f250354f8d1",
"attemptCount": 1,
"httpStatusCode": 429,
"executionStatus": "failed",
"createdAt": "2024-11-25T10:30:00.777Z",
"updatedAt": "2024-11-25T10:30:00.777Z",
"payloadDetails": {
"response": "<!DOCTYPE html>\n<html>\n<head>\n <title>Error: Request limit exceeded. Sign up to unlock more requests.</title>\n <link href=\"https://cdn.example.com/css/app.css\" rel=\"stylesheet\">\n</head>\n<body>\n<div class=\"container\" style=\"padding: 50px\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <h1><img src=\"https://cdn.webhook.site/icon.png\" alt=\"Logo\" style=\"width:40px; margin-top: -5px\">\X</h1>\n\n <p class=\"lead\">Request limit exceeded. Sign up .</p>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-4 col-sm-offset-4 text-center\">\n <p>\n You have been rate limited due to too many requests to this URL.\n This is either because you have not purchased\n, or the endpoint has a rate limit.<br>\n <br>\n To remove the request limit limit.\n <br><br>\n If you are already subscribed and getting this error, please <a href=\"https://</a>.\n <br><br>\n <a class=\"btn btn-lg btn-success\" href=\"/register\">Sign Up Now</a>\n </p>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 40px\">\n <div class=\"col-sm-12 text-center\">\n <p class=\"small\"><a href=\"/\">\n <i class=\"bi-house-fill\"></i> Home</a>\n  \n <a href=\"/control-panel\">\n <i class=\"bi-gear-fill\"></i> Control Panel</a>\n  \n <a href=\"/register\">\n <i class=\"bi-person-add\"></i> Create Account</a>\n  \n\n <a href=\"/login\">\n <i class=\"bi-door-open-fill\"></i> Login</a></p\u003e\n <br>\n </div>\n </div>\n</div>\n</body>\n</html>\n",
"request": "{\"service\":\"channels\",\"event\":\"sms.outbound\",\"payload\":{\"id\":\"cb66df55-a060-4f37-be91-c8b8b4c4221e\",\"channelId\":\"8652c8f7-11e2-5f63-a03f-f2998f8bc6f5\",\"sender\":{\"connector\":{\"id\":\"e60a0e31-bb8f-4d56-97e7-3e50b157512d\",\"identifierValue\":\"+12345678\"}},\"receiver\":{\"contacts\":[{\"id\":\"34f282bf-7e19-4224-a1a7-05a63e4cfac9\",\"identifierKey\":\"phonenumber\",\"identifierValue\":\"+123456789\",\"countryCode\":\"NL\"}]},\"body\":{\"type\":\"text\",\"text\":{\"text\":\"help\"}},\"meta\":{},\"reference\":\"\",\"parts\":[{\"platformReference\":\"cb66df55-a060-4f37-be91-c8b8b4c4221e:b2d7a013-86df-4aa7-8245-8f3715c87ae2\"}],\"status\":\"sent\",\"validity\":129600,\"reason\":\"\",\"direction\":\"outgoing\",\"chargeableUnits\":1,\"lastStatusAt\":\"2024-11-25T10:30:00.39Z\",\"createdAt\":\"2024-11-25T10:29:59.757Z\",\"updatedAt\":\"2024-11-25T10:30:00.39Z\",\"batchId\":null}}"
}
}
]
}