Sign inGet started

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.
  1. List all logs for a webhook subscription
  2. Get webhook log details by request ID
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.
Queryparameters
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
Antwoord-payload
results
array of object
Onderliggende attributen tonen
results.requestId
string
The requestId associated with the webhook log.
results.attemptCount
integer
verplicht
The number of times the webhook has been attempted. example: 1, 2, 3
results.httpStatusCode
integer
verplicht
The HTTP status code returned by the webhook. example: 200, 400, 500
results.executionStatus
string
verplicht
Possible values: succeeded, failed
results.createdAt
string
verplicht
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.
Codevoorbeeld
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.
Queryparameters
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.
Antwoord-payload
results
array of object
The list of webhook logs with details, such as the body and the response, for each delivery attempt.
Onderliggende attributen tonen
results.requestId
string
The requestId associated with the webhook log.
results.attemptCount
integer
verplicht
The number of times the webhook has been attempted. example: 1, 2, 3
results.httpStatusCode
integer
verplicht
The HTTP status code returned by the webhook. example: 200, 400, 500
results.executionStatus
string
verplicht
Possible values: succeeded, failed
results.createdAt
string
verplicht
results.payloadDetails
object
Onderliggende attributen tonen
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.
Codevoorbeeld
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.
Codevoorbeeld
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"
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.
Example of a delivery attempt. You can obtain the request ID on the headers through the key 'messagebird-request-id'
Codevoorbeeld
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}}"