Skip to main content

Webhooks

Webhooks let your application receive notifications when selected events occur in CleverReach, instead of repeatedly polling the API. To receive them, your application exposes an HTTPS endpoint that CleverReach can call.

How It Works​

  • When a selected event occurs, CleverReach sends an HTTPS POST request with an application/json payload to your endpoint. The payload identifies the event and includes data about the change. Its exact structure depends on the event. See the event catalog and payload examples.
  • Your application verifies the x-cr-calltoken header and returns a successful response, such as 200, within 5 seconds to acknowledge receipt. The event does not have to be fully processed before you respond. If processing takes longer, persist or enqueue the event before acknowledging it, then process it asynchronously. See Configure Webhooks for token verification details.
  • If delivery fails or takes too long, CleverReach retries it. The same event may therefore arrive more than once, so make sure your application does not perform the same action twice. Some sensitive payload fields are encrypted. See how to decrypt them.

Getting Started​

  1. Choose what to listen for. Browse the event catalog.
  2. Prepare your endpoint. Your application must be reachable through a public HTTPS URL and handle both the verification GET request and event POST requests.
  3. Register the webhook. Send the registration request only after your endpoint is ready. CleverReach verifies the URL as part of registration. Follow Configure Webhooks.
  4. Test your handler. Use the payload examples to check how your application processes incoming events.

You need a REST API access token with the Webhook (oa_webhooks) scope to manage webhooks, regardless of event type. Additional scopes are needed only if you also use the corresponding API functions. See Authentication: Scopes for scope configuration.