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.
Before you start · 1 thing · for ownersAn API key or OAuth token with read scope on the unit
- An API key or OAuth token with the
readscope on the unit. See Create and revoke an API key.
Steps
GET /api/v1/webhooks/events.POST /api/v1/webhooks/subscriptions, with a body holding object_slug, events and target_url.signing_secret that starts with whsec_. It shows only once, so save it.2xx quickly, and do heavy processing in the background.GET /webhooks/subscriptions, and delete with DELETE /webhooks/subscriptions/:slug.The request you receive
X-Corteksa-Eventrecord.updatedX-Corteksa-DeliveryX-Corteksa-Signaturet=...,v1=... for verificationThe 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
403 Public webhooks must be managed with an API key or an OAuth token403 when creatingread on the unit.2xx, or the change came from your own key.A real example
The outside booking system needs to know about every appointment canceled in Corteksa.
- The developer subscribed to
record.updatedon the “Appointments” unit. - Their system checks
changed_fields, and cancels the booking when the status changes to “Canceled”.
The slot frees up in the booking system within seconds of being canceled.