Add a webhook
Add a webhook endpoint that receives real-time events from the chatbot: chat, live-chat-escalation, lead-submission, user-online or user-offline. Your plan must include webhooks. A chatbot can have up to 5 webhook endpoints; adding an event to an existing url subscribes that endpoint to one more event.
The Webhooks page documents every event's body and how to verify deliveries. A chat event triggered by a /chat request with skipCache: true carries regenerate: true (the field is absent otherwise). A live-chat-escalation matches its chat event by conversation_id; a lead-submission has no conversation_id, so pass its lead.uuid as leadId to Get conversations.
Request
- Base URL: https://api.chat-data.com/api/v2
- URL: https://api.chat-data.com/api/v2/add-webhook
- Auth: HTTP bearer
Request body
Example request
{
"chatbotId": "6650f1c2a9e4b83d2c7a1f05",
"url": "https://example.com/webhooks/chat-data"
}Response
Successful response.
Example response
{
"webhooks": [
{
"endpoint": "https://example.com/webhooks/chat-data",
"secret": "4f9a2c7e1b8d3f6a0c5e9b2d7a1f4c8e3b6d9f2a5c8e1b4d7f0a3c6e9b2d5f8a",
"enable": true,
"contentType": "text/plain"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.