Webhooks allow you to get programmatical notifications from Cause Machine about changes to your data as they happen. If you're new to webhooks, read this guide to learn more.
Rather than requiring you to pull information via our API, webhooks will push information to your endpoint. When one of those events is triggered (for example a new member registers), Cause Machine will send this notification as an HTTP POST request, with a JSON body, to the endpoint(s) you specify.
You can create a new webhook in the Cause Machine web app via Settings > Integrations > Webhooks or via the API.
For testing and sandboxing purposes, you could use RequestBin, Webhook Tester or ngrok.
When configuring a webhook, you can choose which activity types you would like to receive payloads for. You can even opt-in to all current and future activity types. Only subscribing to the specific activity types you plan on handling is useful for limiting the number of HTTP requests to your server. You can change the list of subscribed activity types through the API or UI anytime.
Each activity type corresponds to a certain set of actions that can happen in your community. For example, if you subscribe to the new membership activit type you'll receive detailed payloads every time a new member registers.
To see all of the available activity types, click here
Each activity type has a specific payload format with the relevant activity information.
You can see example payloads by calling the v1/activities endpoint
Webhooks retry policy is as follows:
In case the original notification sending attempt fails (due to receiving a non-2xx response code or exceeding timeout of 20 seconds), we will try 6 more times: after approximately 5 minutes, 15 minutes, 1 hour, 4 hours, 16 hours, and 3 days.