Create a Webhook Subscription.
The Webhook Subscription to be created
The set of events this Webhook Subscription subscribes to. Allowed values: [SLAEvaluationVoided, ConversationPending, SLAEvaluationBreached, ConversationMessageAdded, ConversationCustomAttributeUpdated, ConversationTranscriptionAdded, SLAEvaluationAchieved, ConversationAssigned, ConversationMessageDeliveryDelivered, ConversationMessageDeliveryInfo, ConversationTransferred, ConversationEnqueued, AgentUnbannedEnduser, TypingStarted, ConversationCreated, ConversationUnassigned, ConversationOpen, ConversationAbandoned, ConversationClosed, ConversationMessageDeliveryFailed, ConversationTagAdded, ConversationNoteAdded, AgentBannedEnduser, ConversationEndUserReplaced, ConversationMessageDeliverySeen, AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp, ConversationTagRemoved, ConversationRated, SLAEvaluationPending, ConversationMessageDeliverySpamComplaint, ConversationPendingExpired]
- BasicAuth
- NoAuth
- TokenAuth
curl -i -X POST \
https://dev.dixa.io/v1/webhooks \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dashboard Integration",
"events": [
"ConversationCreated",
"ConversationClosed"
],
"url": "https://example.webhook/dashboard_integration",
"authorization": {
"username": "webhook_user",
"password": "webhook_password",
"_type": "BasicAuth"
},
"customHeaders": {
"X-Automation-Webhook-Token": "<TOKEN>",
"X-Example-Header": "ExampleValue"
},
"enabled": true,
"filters": {
"Conversation": {
"strategy": "All",
"conditions": [
{
"field": "InitialChannel",
"values": [
"email",
"pstn_phone"
],
"_type": "IsOneOf"
},
{
"field": "QueueId",
"values": [
"f0475e4c-64ae-4c8e-8644-4ed10dc8d752"
],
"_type": "IsNotOneOf"
},
{
"field": "OperationOrigin",
"values": [
"ApiImport"
],
"_type": "IsNotOneOf"
}
],
"_type": "CombinedFilters"
}
}
}'{ "data": { "id": "cb452b81-6748-40ab-af85-6559b371bc5d", "name": "Dashboard Integration", "subscribedEvents": [ … ], "url": "https://example.webhook/dashboard_integration", "headers": { … }, "secretKey": "4g4h988p468g785965b780684bde5546c52gge658d76b4q33fb69c526ea4bdbc", "enabled": true, "createdAt": "2023-08-01T09:30:15Z", "createdBy": "e979cc3b-17b2-4850-b049-13c758763d1c", "updatedAt": "2023-08-02T15:09:30Z", "updatedBy": "64b777c3-eb82-49fb-bb3e-294afb5d840c", "filters": { … } } }