Docs pages
Webhooks
Last updated: November 24, 2026
Endpoints
A webhook endpoint is an HTTPS URL that Calvana posts events to. Each one has the event types it wants, optional filters, its own signing secret and an owner. The owner is the key that created it, or the workspace for an endpoint made on Settings > Developers.
curl -X POST https://api.calvana.com/v1/webhook_endpoints \
-H "Authorization: Bearer calvana_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 2f8b6a1c-endpoint-crm-sync" \
-d '{
"url": "https://hooks.example.com/calvana",
"event_types": ["booking.created", "booking.rescheduled", "booking.cancelled"],
"description": "CRM sync",
"filters": { "calendar_ids": ["cal_01h9b4d6f8h0j2k4m6p8r0t2v4"] }
}'event_typeslists types, or["*"]for every type the owner may read, now and later. A type the key can't read gets 422event_type_not_allowed.filters.calendar_idsnarrows booking events andfilters.form_idsnarrows submission events. Prospect and note events ignore filters.filters.changed_bynarrows booking events by who made the change:prospectfor the prospect's own,teamfor everyone else's (members, API keys, CRMs and Calvana's automatic changes), orany, the default. APATCHwithfiltersreplaces them all, so a list left out becomes empty and achanged_byleft out becomesany.- The answer holds the
secret,whsec_and 32 random bytes in base64, this once. Rotating returns a new one. Settings > Developers shows it to Owners and Admins behind a Reveal button. - A workspace has up to 20 enabled endpoints, plus 200 made by Zapier keys.
- An endpoint keeps the major version it was made with, in
api_version, until you change it. When a major version retires, Calvana disables its endpoints rather than change the shape of their payloads. - Only the owning key changes, tests, replays or deletes an endpoint through the API. Endpoints the workspace owns change only on Settings > Developers.
- Creating, changing and deleting an endpoint adds a row to Team Activity. A URL change, or a new endpoint made by anything but Zapier, also emails the workspace's Owners.
Reading needs webhooks:read and every change needs webhooks:write:
| Operation | What it does |
|---|---|
GET /v1/webhook_endpoints | List endpoints, with each URL masked unless the key owns it |
POST /v1/webhook_endpoints | Create one. The answer holds the signing secret, once. |
GET /v1/webhook_endpoints/{id} | Read one, without its secret |
PATCH /v1/webhook_endpoints/{id} | Change url, event_types, description, filters, enabled or api_version |
DELETE /v1/webhook_endpoints/{id} | Delete it and drop its queued deliveries |
POST /v1/webhook_endpoints/{id}/rotate_secret | Make a new secret and keep the old one signing for a while |
POST /v1/webhook_endpoints/{id}/test | Send a made-up event of the type you name. Answers 202 with the delivery. |
POST /v1/webhook_endpoints/{id}/replay | Send again every matching event since a time |
GET /v1/webhook_endpoints/{id}/deliveries | Its deliveries, newest first, by status and event type |
GET /v1/webhook_deliveries/{id} | One delivery: status, attempts, next attempt, last response status |
GET /v1/webhook_deliveries/{id}/attempts | Each attempt's signature headers, status, time and first 4 KB of response |
POST /v1/webhook_deliveries/{id}/retry | Send a delivery again now, even one that succeeded |
Event types
An event type is the object and what happened to it. data.object is the object as v1 shows it right after the change. data.previous holds the old values of the fields listed here, and is null for the other types.
| Event type | Fires when | data.previous |
|---|---|---|
booking.created | A prospect books, or a member places a call with Book a call. | |
booking.rescheduled | The call moves to another time: a member or API move, a prospect reschedule, or the prospect undoing a bring-forward. | start_at, end_at, host, and confirmation when the move took a confirmation back |
booking.brought_forward | The prospect takes an earlier time, by bring-forward or a pull-up claim. | start_at, end_at, host, and confirmation when the move took a confirmation back |
booking.cancelled | A member, the prospect, a declined calendar invite, a connected CRM or the API cancels the call. | status, attendance, outcome |
booking.restored | A cancel is undone, or the prospect rebooks a cancelled call. | status, attendance, outcome, and start_at, end_at, host and confirmation when a rebook changes them |
booking.host_changed | Another host takes the call at the same time: a Hub move or swap, a transfer claim, or offboarding. | host |
booking.confirmed | The prospect confirms, or a member or the API marks the call confirmed. The first confirmation wins, so confirming again fires nothing. | confirmation |
booking.unconfirmed | A member takes a confirmation back, or the prospect replies to decline. A move to another time takes it back too, in the move's own event. | confirmation |
booking.updated | Another of the booking's own fields changes: free, guest_emails or conferencing. | The fields that changed |
booking.prospect_joined | The prospect first joins the call. | |
booking.host_joined | The host first joins the call. | |
booking.outcome_recorded | The call's outcome is written or changed, other than by a cancel. | outcome, attendance |
submission.created | A prospect's first answers on a form are saved. | |
submission.disqualified | The answers disqualify the prospect. | |
submission.abandoned | A partial submission sits idle for 5 minutes with no booking by that prospect since. Fires at most once, up to 24 hours after the last answer. | |
submission.blocked | The spam gate refuses the prospect. | |
submission.completed | The prospect finishes a standalone form, which books nothing. | status |
submission.booked | The prospect picks a time. booking.created fires for the booking in the same change. | status |
submission.deleted | Its form is deleted, which deletes its answers. | |
prospect.created | A new prospect from a form, a booking, or the HubSpot contact sync where the workspace lets it create prospects. | |
prospect.updated | A prospect's name, email, phone or spam mark changes. | The fields that changed |
note.created | A member adds a note in the app, or the API adds one. | |
note.updated | A note's text changes. | content |
note.deleted | A note is deleted. |
- One change makes one event per object. A Hub move that changes the host and the time is one
booking.rescheduledwithhostindata.previous. A booking from a form changes two objects, so it sendsbooking.createdandsubmission.booked. booking.createdfires when the booking is saved, withconferencing.statuspending.booking.updatedfollows once the Zoom meeting exists.- A
*.deletedevent'sdata.objectholds onlyid,objectanddeleted: true. Calvana never deletes a prospect today, so there is noprospect.deleted. - A late event still arrives, with its true
timestamp. Workflows skip some messages that are more than 15 minutes late, and webhooks never do. - Some changes send no event about the object.
attendancemoves fromupcomingtounknownwhen a call's time passes, and a partial submission's answers change while the prospect fills in the form. The submission's ending event carries its final answers.
Payload
Each delivery is a POST whose body is the event, the same JSON that GET /v1/events/{id} answers:
{
"id": "evt_01jc9w3k7m2x8q4r5t6v7y8z9a",
"object": "event",
"type": "booking.rescheduled",
"api_version": "v1",
"timestamp": "2026-11-10T14:03:22.418Z",
"revision": 7,
"test": false,
"workspace_id": "wsp_01h8x2c4d6f8g0j2k4m6n8p0q2",
"actor": { "type": "prospect", "member_id": null, "api_key_id": null, "app": null, "reason": null },
"data": {
"object": {
"id": "bkg_01jc8r2s4t6v8x0z2b4d6f8h0j",
"object": "booking",
"start_at": "2026-11-12T16:00:00Z",
"end_at": "2026-11-12T16:30:00Z",
"...": "every other booking field"
},
"previous": {
"start_at": "2026-11-11T15:00:00Z",
"end_at": "2026-11-11T15:30:00Z",
"host": { "id": "mem_01h9a3c5e7g9j1k3m5n7p9r1s3", "name": "Casey Jones", "email": "casey@acme.com" }
}
}
}| Field | Meaning |
|---|---|
id | The event's ID, also sent as the webhook-id header. It stays the same on every retry and every endpoint, so dedupe on it. |
type | The event type. An open enum. |
api_version | The endpoint's major version, which decides the shape of data.object |
timestamp | When Calvana recorded the change, in UTC with milliseconds |
revision | The object's revision after this change. It only grows, and can skip numbers. Keep the highest per object and drop anything older. |
test | True only for test events, which have made-up IDs and aren't in the event log |
workspace_id | The workspace the event belongs to, for a receiver that serves several |
actor | Who made the change, below |
data.object | The full object after the change |
data.previous | The changed fields' old values on the types that list them, else null |
- The full object lets Zapier or another no-code tool use a payload without a second call. To act on the latest state, read the object with
GETand treat the payload as a hint. - An answer longer than 2,000 characters is cut to 2,000 in a payload, with
truncated: true.GET /v1/submissions/{id}has the full text. No payload is over 256 KB. linksandresume_urlarenullunless the endpoint's owner holdslinks:read.- Delivery is at least once, so the same event can arrive twice, for example when your server answered after our timeout. Dedupe on
webhook-id. - Order isn't guaranteed, because retries and your own queue reorder events. Keep the event with the highest
revisionper object, or read the object again.
Actor
Every event names who made the change. All five fields are always there:
{ "type": "member", "member_id": "mem_01h9a3c5e7g9j1k3m5n7p9r1s3", "api_key_id": null, "app": null, "reason": null }
{ "type": "prospect", "member_id": null, "api_key_id": null, "app": null, "reason": null }
{ "type": "system", "member_id": null, "api_key_id": null, "app": null, "reason": "auto_free" }
{ "type": "api_key", "member_id": null, "api_key_id": "key_01h9e2g4j6k8m0n2p4q6r8s0t2", "app": null, "reason": null }member is any team member acting in the app, whether or not they host the call. A member acting through an AI assistant on the MCP server has the assistant's name in app. system names its reason, such as auto_free. type is an open enum.
Attribution and URL parameters
Calvana keeps the query parameters on the address a prospect opens your form at, and sends them with every booking and submission as url_params. That covers UTMs, ad click IDs, and keys of your own, such as a visitor ID from your tracking tool. Put the parameters on the booking link, or on the page that embeds the form. The embed passes its page's query into the form, so there is nothing else to set up.
https://calvana.com/book/acme/strategy-call?utm_source=youtube&utm_medium=video&utm_campaign=strategy-call&utm_content=vid-042&visitor_id=v_8f2k1q{
"id": "evt_01jc9w3k7m2x8q4r5t6v7y8z9a",
"object": "event",
"type": "booking.created",
"api_version": "v1",
"timestamp": "2026-11-10T14:03:22.418Z",
"revision": 3,
"test": false,
"workspace_id": "wsp_01h8x2c4d6f8g0j2k4m6n8p0q2",
"actor": { "type": "prospect", "member_id": null, "api_key_id": null, "app": null, "reason": null },
"data": {
"object": {
"id": "bkg_01jc8r2s4t6v8x0z2b4d6f8h0j",
"object": "booking",
"calendar": { "id": "cal_01h9b4d6f8h0j2k4m6p8r0t2v4", "name": "Strategy Call", "duration_minutes": 45 },
"submission_id": "sub_01jc8r2s4t6v8x0z2b4d6f8h0j",
"channel": null,
"url_params": {
"utm_source": "youtube",
"utm_medium": "video",
"utm_campaign": "strategy-call",
"utm_content": "vid-042",
"visitor_id": "v_8f2k1q"
},
"...": "every other booking field"
},
"previous": null
}
}Where they appear
| Where | Field |
|---|---|
| Every booking.* event: created, rescheduled, cancelled, confirmed and the rest | data.object.url_params |
| Every submission.* event, from the first captured answers on | data.object.url_params |
GET /v1/bookings/{id}, GET /v1/submissions/{id} and their lists | url_params |
| Zapier | attribution__utm_source to attribution__utm_content, and each key as attribution__url_params__visitor_id |
Rules
- The first parameters a submission gets stay on it. They carry through every form step, the calendar pick and the confirmation onto the booking, and through its reschedules and cancels. A later visit through another link changes nothing.
- A rebook is a new booking, with its own ID and its own
booking.created. When the prospect books the same calendar again with no parameters of their own, as the Book a new time link after a cancel or a no-show does, the new booking keeps the parameters of their last booking on that calendar. - Values arrive as a browser decodes them, trimmed at both ends:
%2Bis+, and a bare+is a space. Percent-encode an opaque ID that can hold+,&or=and it comes back unchanged. utm_keys are stored lower case. Every other key keeps its spelling, sovisitorIdstaysvisitorId.- Calvana's own keys aren't in
url_params, in any letter case.viais the booking'schannel, andrepandsetterpick people. The prefill keysfirst_name,last_name,email,phone,phone_numberandtelbecome answers. The embed keepsform,eventId,type,preview,view,callandcalvana_callfor itself. - A blank value, a key over 100 characters, a value over 1,000 characters and every key past the 50th are left out. The booking still goes ahead.
- Book a call keeps the parameters of the submission it books, and has
{}without one. A booking made throughPOST /v1/bookingskeeps theurl_paramsyour server sends, under the same rules.
Counting each booking once
- The event
id(thewebhook-idheader) stays the same on every retry. Drop a delivery whose ID you have seen. - A booking fires
booking.createdonce, and itsdata.object.id(bkg_) stays the same through reschedules and cancels. Count a conversion once per booking ID, or once per visitor ID if a rebook shouldn't count again. - To try a receiver before a real booking, send a test event from the endpoint. Its made-up booking carries UTMs and a
visitor_idinurl_params.
Verifying signatures
Calvana signs every delivery with the Standard Webhooks scheme, so its open source libraries verify Calvana's webhooks unchanged. Each endpoint has its own secret.
| Header | Value |
|---|---|
webhook-id | The event ID, evt_... |
webhook-timestamp | Unix seconds when this attempt was signed |
webhook-signature | v1, and a base64 HMAC-SHA256. During a secret rotation, two of them separated by a space. |
user-agent | Calvana-Webhooks/1 (+https://calvana.com/docs/api/webhooks) |
content-type | application/json |
- The signed content is
{webhook-id}.{webhook-timestamp}.{body}, keyed with the secret's part afterwhsec_, base64-decoded. - Verify the raw body bytes before you parse them. JSON parsed and written out again won't match the signature.
- Compare in constant time, and refuse a
webhook-timestampmore than 5 minutes from your clock, so a captured request can't be replayed later. - Accept a request when any one of its signatures matches.
Node, no dependencies
import { createHmac, timingSafeEqual } from "node:crypto";
// headers: the request's headers with lower-case names. body: the raw body, exactly as received.
export function verifyCalvanaWebhook(secret, headers, body) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
if (!id || !timestamp || !headers["webhook-signature"]) throw new Error("Missing webhook headers");
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) throw new Error("Timestamp too far from now");
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = createHmac("sha256", key).update(`${id}.${timestamp}.`).update(body).digest();
const signed = headers["webhook-signature"].split(" ").some((entry) => {
const [version, signature = ""] = entry.split(",");
const given = Buffer.from(signature, "base64");
return version === "v1" && given.length === expected.length && timingSafeEqual(given, expected);
});
if (!signed) throw new Error("No valid signature");
return JSON.parse(body);
}// Express: express.raw keeps the body as the bytes Calvana signed.
app.post("/calvana", express.raw({ type: "application/json" }), (req, res) => {
const event = verifyCalvanaWebhook(process.env.CALVANA_WEBHOOK_SECRET, req.headers, req.body);
queue.add(event); // answer fast, work later
res.sendStatus(204);
});Python, no dependencies
import base64
import hashlib
import hmac
import json
import time
# headers: the request's headers, such as Django's or Flask's request.headers. body: the raw bytes received.
def verify_calvana_webhook(secret: str, headers, body: bytes) -> dict:
msg_id = headers["webhook-id"]
timestamp = headers["webhook-timestamp"]
if abs(time.time() - int(timestamp)) > 300:
raise ValueError("Timestamp too far from now")
key = base64.b64decode(secret.removeprefix("whsec_"))
signed = f"{msg_id}.{timestamp}.".encode() + body
expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode()
for entry in headers["webhook-signature"].split(" "):
version, _, signature = entry.partition(",")
if version == "v1" and hmac.compare_digest(signature, expected):
return json.loads(body)
raise ValueError("No valid signature")# Django. With Flask, pass request.get_data() as the body.
event = verify_calvana_webhook(settings.CALVANA_WEBHOOK_SECRET, request.headers, request.body)With the Standard Webhooks library
The libraries take the secret with its whsec_ prefix and check the timestamp too.
// npm install standardwebhooks
import { Webhook } from "standardwebhooks";
const event = new Webhook(secret).verify(rawBody, headers);# pip install standardwebhooks
from standardwebhooks.webhooks import Webhook
event = Webhook(secret).verify(raw_body, headers)Rotating the secret
POST /v1/webhook_endpoints/{id}/rotate_secret makes a new secret and returns it. For the next 24 hours each delivery carries two signatures, from the new secret and the old one, so you can deploy the new secret without dropping events. expire_previous_in sets that window, from 0 to 604,800 seconds. Send 0 when the old secret leaked.
Delivery and retries
POSTwebhook-id, new signature| Your endpoint answers | Calvana |
|---|---|
| Any 2xx within 10 seconds | Marks the delivery succeeded and ignores the response body |
| Nothing within 3 seconds to connect or 10 seconds in all | Counts a failure and retries |
| 429, 5xx, a connection error or a TLS error | Counts a failure and retries |
| Another 4xx | Counts a failure and retries, since a 400 is often a bug you fix and redeploy |
| A 3xx redirect | Counts a failure without following it. The delivery log says to update the URL. |
| 410 Gone | Disables the endpoint at once and emails its owners |
Retry-After on a 429 or 503 | Waits that long, up to 1 hour past the next scheduled attempt |
Answer within 10 seconds. Put the event on your own queue, answer 2xx, then do the work.
Calvana keeps the first 4 KB of each answer's body with its attempt, 2xx included, until the event is 30 days old. The credential that made the endpoint reads it with GET /v1/webhook_deliveries/{id}/attempts, and the workspace's Owners and Admins read it on Settings > Developers. Keep secrets and personal data out of your answers.
| Attempt | After the one before | After the event |
|---|---|---|
| 1 | At once | 0 |
| 2 | 5 seconds | 5 seconds |
| 3 | 5 minutes | About 5 minutes |
| 4 | 30 minutes | About 35 minutes |
| 5 | 2 hours | About 2.6 hours |
| 6 | 5 hours | About 7.6 hours |
| 7 | 10 hours | About 17.6 hours |
| 8 | 14 hours | About 31.6 hours |
| 9 | 20 hours | About 51.6 hours |
| 10 | 24 hours | About 75.6 hours |
Each wait gets up to 10% random jitter. After the tenth failure the delivery is failed. For 30 days you can send it again from Settings > Developers or with POST /v1/webhook_deliveries/{id}/retry.
Failing endpoints
- After 24 hours in which every attempt to an endpoint failed, Calvana emails the workspace's Owners and the endpoint's creator, once per failure streak.
- After 5 days of failures, Calvana disables the endpoint with
disabled_reason: "failing"and emails them again. A disabled endpoint gets no new deliveries. - One success ends the streak.
- A healthy endpoint gets up to 4 deliveries at a time and a failing one gets 1, never two about the same object at once. One endpoint's failures never slow another's deliveries.
- Turning it back on offers to replay from
failing_since. That covers the deliveries that failed and the events it missed while off, up to 30 days back. disabled_reasonismanual,failing,gone(it answered 410),owner_revoked(its key was revoked) orversion_retired. It is an open enum.
Replay and catching up
replaymakes a delivery for each matching event since a time that has none, and sends each failed one again with a fresh attempt count. It leaves deliveries that succeeded alone.retrysends one delivery again now, even one that succeeded.testsends a made-up event of the type you name, with"test": true.- Calvana keeps events and deliveries for 30 days. After a longer outage, or with no inbound URL at all, read the event log and resync with updated_after.
curl -X POST https://api.calvana.com/v1/webhook_endpoints/whe_01jcb2d4f6h8j0k2m4n6p8r0s2/replay \
-H "Authorization: Bearer calvana_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: replay-after-outage-2026-11-10" \
-d '{"since": "2026-11-10T00:00:00Z"}'
{ "object": "replay", "endpoint_id": "whe_01jcb2d4f6h8j0k2m4n6p8r0s2", "events_queued": 42 }URLs and IP address
- A URL must be
https://on port 443 or 1024 to 65535. Calvana refuses any other with 422endpoint_url_refused. - Calvana resolves the host at every send, refuses private, loopback, link-local, multicast, reserved and carrier-grade NAT addresses, IPv4 and IPv6 alike, and connects to the address it checked.
- A URL can't point at calvana.com, api.calvana.com or any other Calvana host.
- Deliveries leave from one fixed IP address per environment. If your firewall allowlists senders, email help@calvana.com for production's address, and keep checking signatures too.
- A URL may hold a secret in its path or query, as Zapier's does. Calvana returns the full URL only when you create the endpoint and to the key that owns it, and masks it everywhere else.