Webhook Introduction
A webhook is an HTTP POST request sent to a target you define at CRM Back Office - Settings - Dev space - Webhooks
.
Notes
- Please note that we do not send any info to endpoints using http, only https.
- Supported versions of TLS protocol are 1.2 or higher.
- Not receiving an answer from webhook endpoint for more than 5 seconds will be considered as a timeout.
- Webhook event history is visible in CRM Back Office.
Webhook security alert
- Your security matters.
- When using webhooks to exchange data, be cautious about the destination URL. Only authorize URLs under your control. Using unauthorized URLs could lead to data leaks and compromise your information.
- For more security measures, please visit this section
Webhook Response Time
Your server should respond with a 2XX response within 10 seconds of receiving a webhook delivery. If your server takes longer than that to respond, then CRM terminates the connection and considers the delivery a failure.
In order to respond in a timely manner, you may want to set up a queue to process webhook payloads asynchronously. Your server can respond when it receives the webhook, and then process the payload in the background without blocking future webhook deliveries. For example, you can use services like Hookdeck or libraries like Resque (Ruby), RQ (Python), or RabbitMQ (Java).
Payload Format
Webhook payload is in the following JSON format
{
"source": {
"service": "admin",
"group": "crm.webhooks.groups.xxx",
"event": "crm.webhooks.xxx"
},
"target": {
"name": "Custom name"
},
"version": "1.0.0",
"data": {}
}
Description of the Payload format
Key | Type | Description |
---|---|---|
source | object | source of the webhook |
source.service | string | service that trigger this webhook |
source.group | string | webhook event group |
source.event | string | webhook event type |
target | object | target of the webhook |
target.name | string | the webhook name that is configured in CRM |
version | string | event version |
data | object | the information that will be transfer for different webhook events |