What is a Webhook?

ChatBrick uses webhooks to notify your application when data is updated or a new event is triggered. For example, you can use webhooks to receive notifications when a contact is connected to a store.

Webhook messages are POST requests sent to a preconfigured endpoint. You are responsible for creating and hosting this endpoint, and you should configure its URL on ChatBrick.

You typically use one endpoint to receive all event types from ChatBrick. Optionally, you can create multiple endpoints to receive specific event types at each endpoint.

The way to indicate that a webhook event has been processed is by returning a 2xx (status code 200-299) response to the webhook event within a reasonable timeframe (15s). It’s also important to disable CSRF protection for this endpoint if the framework you use enables it by default.

Another important aspect of handling webhooks is verifying the signature and timestamp when processing them. You can learn more about it in the webhook signature verification documentation.