Get a webhook subscription
GET
/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}
Get the specified webhook subscription given its ID.
Payload respons
id
string
wajib
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
organizationId
string
wajib
workspaceId
string
wajib
service
string
wajib
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
event
string
wajib
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
Tampilkan atribut turunan
eventFilters.key
string
wajib
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
wajib
template
string
url
string
wajib
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.
signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
oauth2
object
OAuth 2.0 client credentials configuration.
Tampilkan atribut turunan
oauth2.tokenUrl
string
wajib
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
wajib
The OAuth 2.0 client identifier.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
status
string
wajib
Possible values: active, inactive
statusReason
string
A human-readable explanation for the current status of the webhook subscription.
createdAt
string
updatedAt
string
Contoh kode
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/webhook-subscriptions/{webhookSubscriptionId}' \
-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
- Previously created Webhook subscription ID: 0edf722b-93b4-4451-8a5d-4fafba5cdf8b
- AccessKey: abcd
Getting a previously created webhook subscription
Contoh kode
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"Contoh kode
{
"id": "0edf722b-93b4-4451-8a5d-4fafba5cdf8b",
"organizationId": "ff1a5949-a704-48d2-99d9-b2cdfb7fef3e",
"workspaceId": "b2d7a013-86df-4aa7-8245-8f3715c87ae2",
"service": "channels",
"event": "email.interaction",
"eventFilters": [
{
"key": "channelId",
"value": "3e3a68da-85a2-4b12-b114-b2c28117bf37"
},
{
"key": "interactionType",
"value": "opened"
}
],
"template": "",
"url": "https://webhook.site/68be485e-5faa-4363-8033-2e3d236830db",
"status": "active",
"createdAt": "2024-11-25T12:30:55.13273004Z",
"updatedAt": "2024-11-25T12:30:55.132730139Z"
}