All topics
Get started8Account, team & permissions44Units & fields70Records, views & tasks39WhatsApp & Cortex Chat68Email & social27Lead ads & distribution38Automations52Documents & quotes32Dashboards40Cortex AI18Developers & API12
Help Center·448 guidesAll topicsContact support

Subscribe to Webhooks to receive record changes

Instead of polling over and over, subscribe an HTTPS URL to the record.created, record.updated and record.deleted events of a unit, and Corteksa sends a signed request on every change.

6 min
Before you start · 1 thing · for owners
An API key or OAuth token with read scope on the unit

Steps

1
List the available events with GET /api/v1/webhooks/events.
2
Create the subscription with POST /api/v1/webhooks/subscriptions, with a body holding object_slug, events and target_url.
The response carries a signing_secret that starts with whsec_. It shows only once, so save it.
3
Receive the requests and verify the signature. See Verify a Webhook signature and prevent duplicates.
4
Reply with 2xx quickly, and do heavy processing in the background.
5
List your subscriptions with GET /webhooks/subscriptions, and delete with DELETE /webhooks/subscriptions/:slug.

The request you receive

Header
Meaning
X-Corteksa-Event
The event, such as record.updated
X-Corteksa-Delivery
A unique delivery ID. Use it to prevent duplicates
X-Corteksa-Signature
t=...,v1=... for verification

The body carries event, event_type, timestamp, object, record_slug, changed_fields (old and new) and full_record. The keys are field IDs.

No echo

A change made by your key isn’t sent to that same key’s subscription, so syncing doesn’t loop. Changes by users and other keys reach you.

The exception: bulk operations on more than 100 records run in the background, so you receive their delete events even if they came from your key. Treat deleting a record you’ve already deleted as a no-op.

A bulk delete sends a record.deleted event for each record.

Stopping

Delete the subscription, or revoke the key.

If something goes wrong

What you see
Why
What to do
403 Public webhooks must be managed with an API key or an OAuth token
You sent the request with a user session.
Use an API key.
403 when creating
The key doesn’t have read on the unit.
Create a key with read access.
Nothing arrives
The URL doesn’t reply 2xx, or the change came from your own key.
Check your server logs. See Fix integration, API and Webhook errors.

A real example

Basma Clinics
The situation

The outside booking system needs to know about every appointment canceled in Corteksa.

What they did
  1. The developer subscribed to record.updated on the “Appointments” unit.
  2. Their system checks changed_fields, and cancels the booking when the status changes to “Canceled”.
The result

The slot frees up in the booking system within seconds of being canceled.

A made-up company, to show the idea. The numbers are rounded.

Good to know

HTTPS URLs only.
A subscription is managed with an API key or OAuth token only, and each key sees only its own subscriptions.
The events available today are for records only.
Failed attempts are retried at growing intervals.
Did this guide solve it?
If not, we’ll ask what was missing.
Open in Corteksa
Did this guide solve it?

We read every answer. To get a reply, use Contact support.