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.

Examples

Let's establish some of our data that will be used in the following examples:

  • Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352

  • Organization ID: 823fbfaf-f14e-4693-b55a-8ec1c17d649e

  • 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.

curl -X GET "https://api.bird.com/organizations/823fbfaf-f14e-4693-b55a-8ec1c17d649e/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.

curl -X GET "https://api.bird.com/organizations/823fbfaf-f14e-4693-b55a-8ec1c17d649e/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}}"

Last updated