Webhooks
A webhook tells another system the moment a record changes in Cubrel. When a deal is won, a contact is created or a quote is accepted, Cubrel sends a short message to a URL you choose. Zapier, Make, n8n, your shop or your own script can react right away, without asking Cubrel for changes every few minutes.
Webhooks are available on every plan: Starter, Pro and Enterprise. Only admins can manage them.
Creating a webhook
Go to Workspace > Integrations > Webhooks > New Webhook:
- Give the webhook a name for your own reference, such as "Shop sync".
- Pick the module it watches, for example Deals. One webhook watches one module; create several webhooks to watch several modules.
- Pick the events: Created, Updated and Deleted. On ticket modules such as Cases, there's also New ticket message.
- Enter the URL that should receive the events. It must start with
https://and point to a public address. - Save. The webhook's page opens with its signing secret shown. Copy it into the receiving system; it uses it to check that requests really come from Cubrel.
The secret stays hidden on the webhook's page after that. Click the eye button to show it again, or the copy button to copy it without showing it. Each time someone shows or copies it, the Audit Trail records who.
Webhooks can watch the same modules the REST API can reach. Users, roles and a few system modules aren't offered.
What Cubrel sends
Every event is a POST request with a JSON body:
{
"id": "0193b1c2-7f0e-7c5a-9d43-2f1e8a6b0c11",
"event": "deals.updated",
"occurred_at": "2026-10-25T10:00:00Z",
"data": { "id": "…", "name": "Website relaunch", "status": "won", "…": "…" },
"changes": { "status": { "from": "negotiation", "to": "won" } }
}idis unique per delivery. If your system sees the sameidtwice, it can skip the second one.eventis the module and the event, likecontacts.created.datais the record's fields asGET /api/v1/{module}/{id}returns them, so one parser works for both the API and webhooks. Quotes and orders also carry theirline_items;relatedrecords and meeting attendees are left out. Adeletedevent only sends the record'sid.changesis only onupdated: every field that changed, with its old and new value. React tochanges.status.tobeingwoninstead of to every later edit of the deal.
An update that only touches bookkeeping like "last changed at" sends nothing. Webhooks don't depend on who saved the record: changes from the app, the REST API and workflows all send events. Restoring a record from the Bin sends no event.
Changing a quote's or order's line items, in the app or through the REST API, sends an updated event for the record, with its new totals in changes. A request that sends several line items at once sends one event. A conversion rule, such as Quote to Project, sends one created event for the new record once it's finished, copied line items included. Attendee changes send no event, since the meeting record itself didn't change.
Each request also has these headers:
| Header | Content |
|---|---|
X-Cubrel-Event | The event, like deals.updated |
X-Cubrel-Delivery | The delivery id from the body |
X-Cubrel-Signature | t=<timestamp>,v1=<signature> |
Ticket messages
The New ticket message event sends every new message in a ticket's conversation: answers from the customer, replies from your team and automated emails. Internal notes are never sent.
{
"id": "0193b1c2-8a1f-7d2b-a9c4-1b2e3f4a5b6c",
"event": "cases.message_created",
"occurred_at": "2026-10-27T09:15:00Z",
"data": {
"ticket": { "id": "…", "number": "CASE-2026-0042", "name": "Login broken", "status": "pending_input" },
"message": { "id": "…", "author_type": "agent", "author_name": "Lena", "channel": "email", "body_html": "<p>…</p>", "…": "…" }
}
}data.message has the same shape as a message from GET /api/v1/tickets/{module}/{id}/messages, so an app that opened the ticket through the REST API can show your team's answer to the customer.
Checking the signature
Anyone who knows your URL could send it fake events. The signature proves a request came from Cubrel and wasn't changed on the way:
- Read
tandv1from theX-Cubrel-Signatureheader. - Build the text
<t>.<raw request body>, using the body exactly as it arrived, before parsing the JSON. - Compute an HMAC SHA-256 of that text with your signing secret, as a hex string.
- Compare it with
v1. If they match, the request is genuine. Reject requests whosetis more than a few minutes old, so an old request can't be replayed.
In PHP:
[$t, $v1] = sscanf($_SERVER['HTTP_X_CUBREL_SIGNATURE'], 't=%d,v1=%s');
$body = file_get_contents('php://input');
$valid = hash_equals(hash_hmac('sha256', "{$t}.{$body}", $secret), $v1)
&& abs(time() - $t) < 300;If the secret leaked, open the webhook and click Regenerate secret. The old secret stops working at once, so update the receiving system right after.
Testing a webhook
Open a webhook and click Send test. Cubrel sends a test event, like deals.test, with the module's newest record as data, and shows the response code the receiver gave. Tests appear in the delivery list but never count as failures.
Delivery, retries and turning off
Cubrel waits up to 10 seconds for an answer. Any 2xx status counts as delivered. Redirects aren't followed.
If the receiver is down or answers with an error, Cubrel tries again after 1 minute, 5 minutes, 30 minutes and 2 hours. A delivery that still fails after that is marked Failed.
After 10 failed deliveries in a row, Cubrel turns the webhook off and notifies the admin who created it. Check the URL and the receiver, then turn the webhook back on, either on its page or from the list. Turning it on starts the failure count over. A successful delivery also resets it.
Saving records never waits for a webhook: deliveries are sent in the background, so a slow receiver doesn't slow down Cubrel.
Recent deliveries
A webhook's page lists its deliveries, newest first, with the event, status, response code and time. The list is split into pages, and the search box finds deliveries by event, status, response code, response text or record id. Click Resend on a failed delivery to send it again with the same id. Deliveries are kept for 30 days; change this under Webhook Delivery Log Retention in Data Retention.
Imports, bulk changes and undo
An import can create thousands of records at once, which most receivers don't want as single events. So imports send no webhooks unless you tick Trigger webhooks before starting it. The box is only shown when the module has an active webhook, and is off by default. In Import data, one box covers the whole run.
Undoing an import sends Deleted events only if the import sent its Created events.
Deleting records in bulk from a list sends a Deleted event for every record. Changing a field on many records at once from a list sends no webhooks.
Changes in the audit trail
Creating, changing and deleting a webhook, and showing or regenerating its secret, show up in the Audit Trail with the admin who did it.
In short
| Question | Answer |
|---|---|
| Which plans have webhooks? | Every plan; only admins manage them |
| Where do I create one? | Workspace > Integrations > Webhooks > New Webhook |
| Which events are there? | Created, Updated and Deleted, plus New ticket message on ticket modules |
| How do I know a request is from Cubrel? | Check the X-Cubrel-Signature header with your signing secret |
| What if my system is down? | Cubrel retries after 1 minute, 5 minutes, 30 minutes and 2 hours |
| When does a webhook turn itself off? | After 10 failed deliveries in a row; its creator is notified |
| Do imports send events? | Only when Trigger webhooks is ticked for the import |
| How long are deliveries listed? | 30 days by default, adjustable under Data Retention |