POST within seconds.
Use webhooks when you want to react to changes instead of asking the API over and over whether anything is new. Typical uses:
- Keep your own CRM or data warehouse in step with Ciarem contacts.
- Notify a team in Slack when a conversation is assigned or closed.
- Start an automation in your backend when a customer sends a message.
You don’t need webhooks to use Ciarem. They are a tool for developers who connect Ciarem to their own systems. You need a server that can receive HTTPS requests from the internet.
Before you start
Set up your first endpoint
- In the dashboard
- With the API
1
Open Webhooks
Go to Settings, then Webhooks, and click Add endpoint.
2
Enter your URL
Paste the HTTPS address of your server under Endpoint URL. Add a description if you want to remember what the endpoint is for.
3
Pick the events
Leave Send all events on to receive everything, including event types added in the future, or turn it off and tick only the events you need. See the event catalog.
4
Copy the signing secret
After you save, Ciarem shows the endpoint’s signing secret. It starts with
whsec_. Store it on your server: you use it to check that each request really comes from Ciarem. You can see it again later on the endpoint’s page with Show secret.5
Send a test event
Open the endpoint, choose an event under Test event, and click Send test event. Ciarem sends it right away and tells you what your server answered.
What Ciarem sends
Every event is onePOST request with a JSON body:
What your server must do
- Answer with a
2xxstatus within 10 seconds. Any2xxcounts as received. Anything else, including a redirect, a timeout, or a connection error, counts as a failure and is retried. - Verify the signature before acting on the body. See Verify signatures.
- Answer first, work later. If handling an event takes time, save it to a queue and return
200right away. Ciarem does not read your response body. - Expect duplicates and out-of-order events. The same event can arrive more than once, and two events can arrive in a different order than they happened. See Duplicates and order.
- Ignore what you don’t recognize. New event types and new fields are added over time. Skip unknown
typevalues with a200, and don’t reject bodies with extra fields.
URL requirements
Ciarem only sends to URLs that are safe to call from the public internet:- The URL must start with
https://. Plainhttp://is refused. - The host must resolve to a public IP address.
localhost, private network ranges (such as10.x.x.xor192.168.x.x), and link-local addresses are refused, both when you save the endpoint and on every delivery. - Your server must present a valid TLS certificate for that hostname.
- Redirects are not followed. A
301or302is recorded as a failed delivery, so register the final URL. - The URL can be up to 2,048 characters and may include a path, a port, and a query string.
Limits
Next steps
Event catalog
Every event type and the exact body it carries.
Verify signatures
Check that a request comes from Ciarem, with code you can copy.
Deliveries and retries
Retries, the delivery log, sending again, and troubleshooting.