List webhook subscriptions
GET
/workspaces/{workspaceId}/webhook-subscriptions
This endpoint allows you to list all webhook subscriptions for a workspace. You can filter the subscriptions by interactionType, status, and other filters.
This will return a maximum of 100 webhook subscriptions per page, but 10 as default. You can use the limit and cursor query parameters to paginate the results. Learn more about pagination in the Common API Usage pagination section.
Parametri di query
SearchFilters
object
You can use this parameter to filter the results based on the search criteria.
To get all subscriptions for the service channels, you can use it like this: SearchFilter[service]=channels
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
Payload della risposta
results
array of object
Mostra attributi secondari
results.id
string
obbligatorio
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
results.organizationId
string
obbligatorio
results.workspaceId
string
obbligatorio
results.service
string
obbligatorio
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
Possible values: channels, numbers, payments, conversations, templates
results.event
string
obbligatorio
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
results.eventFilters
array of object
Mostra attributi secondari
results.eventFilters.key
string
obbligatorio
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
results.eventFilters.value
string
obbligatorio
results.template
string
results.url
string
obbligatorio
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
results.signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
results.oauth2
object
OAuth 2.0 client credentials configuration.
Mostra attributi secondari
results.oauth2.tokenUrl
string
obbligatorio
The OAuth 2.0 token endpoint where access tokens are requested.
results.oauth2.clientId
string
obbligatorio
The OAuth 2.0 client identifier.
results.oauth2.scopes
array of string
OAuth 2.0 scopes to request.
results.status
string
obbligatorio
Possible values: active, inactive
results.statusReason
string
A human-readable explanation for the current status of the webhook subscription.
results.createdAt
string
results.updatedAt
string
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.
Esempio di codice
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/webhook-subscriptions' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Let's establish some of our data that will be used in the following example:
- Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352
- AccessKey: abcd
Esempio di codice
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/webhook-subscriptions" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd"Esempio di codice
{
"nextPageToken": "WyJvcmdhbml6YXRpb25zI2ZmMWE1OTQ5LWE3MDQtNDhkMi05OWQ5LWIyY2RmYjdmZWYzZSN3b3Jrc3BhY2VzI2IyZDdhMDEzLTg2ZGYtNGFhNy04MjQ1LThmMzcxNWM4N2FlMiN3ZWJob29rLXN1YnNjcmlwdGlvbnMiLCJ3ZWJob29rLXN1YnNjcmlwdGlvbiNhNWMzOWE1Mi0wMDViLTQwOWUtOTM3ZC0yNzE3YzkxODk3OWMiLCJvcmdhbml6YXRpb25zI2ZmMWE1OTQ5LWE3MDQtNDhkMi05OWQ5LWIyY2RmYjdmZWYzZSN3b3Jrc3BhY2VzI2IyZDdhMDEzLTg2ZGYtNGFhNy04MjQ1LThmMzcxNWM4N2FlMiN3ZWJob29rLXN1YnNjcmlwdGlvbnMiLCJ3ZWJob29rLXN1YnNjcmlwdGlvbiNhNWMzOWE1Mi0wMDViLTQwOWUtOTM3ZC0yNzE3YzkxODk3OWMiXQ==",
"results": [
{
"id": "b02e99b2-dc38-4e2d-b349-d9e1fd772c44",
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"service": "payments",
"event": "intent",
"template": "",
"url": "https://www.test.com",
"status": "active",
"createdAt": "2024-09-30T12:31:36.106613753Z",
"updatedAt": "2024-09-30T12:31:36.106613843Z"
},
{
"id": "a5c39a52-005b-409e-937d-2717c918979c",
"organizationId": "823fbfaf-f14e-4693-b55a-8ec1c17d649e",
"workspaceId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
"service": "channels",
"event": "whatsapp.interaction",
"eventFilters": [
{
"key": "channelId",
"value": "f788aecc-4886-5ee9-b392-de28bc2fd063"
},
{
"key": "interactionType",
"value": "read"
}
],
"template": "",
"url": "https://webhook.site/68be485e-5faa-4363-8033-2e3d236830db",
"status": "active",
"createdAt": "2024-11-21T10:44:38.824639879Z",
"updatedAt": "2024-11-21T10:44:38.824640035Z"
}
]Note: if you have more than 10 webhook subscriptions, the results may be paginated. To know more about how to use the nextPageToken to get the following results, refer to this pagination documentation.