calvana/Docs
Docs pages

Webhooks

Last updated: November 24, 2026

Calvana posts a signed event to your HTTPS URL when something changes in your workspace, and retries for about three days until your server answers.

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.

Create an endpoint
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_types lists types, or ["*"] for every type the owner may read, now and later. A type the key can't read gets 422 event_type_not_allowed.
  • filters.calendar_ids narrows booking events and filters.form_ids narrows submission events. Prospect and note events ignore filters.
  • filters.changed_by narrows booking events by who made the change: prospect for the prospect's own, team for everyone else's (members, API keys, CRMs and Calvana's automatic changes), or any, the default. A PATCH with filters replaces them all, so a list left out becomes empty and a changed_by left out becomes any.
  • 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:

OperationWhat it does
GET /v1/webhook_endpointsList endpoints, with each URL masked unless the key owns it
POST /v1/webhook_endpointsCreate 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_secretMake a new secret and keep the old one signing for a while
POST /v1/webhook_endpoints/{id}/testSend a made-up event of the type you name. Answers 202 with the delivery.
POST /v1/webhook_endpoints/{id}/replaySend again every matching event since a time
GET /v1/webhook_endpoints/{id}/deliveriesIts 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}/attemptsEach attempt's signature headers, status, time and first 4 KB of response
POST /v1/webhook_deliveries/{id}/retrySend 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 typeFires whendata.previous
booking.createdA prospect books, or a member places a call with Book a call.
booking.rescheduledThe 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_forwardThe 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.cancelledA member, the prospect, a declined calendar invite, a connected CRM or the API cancels the call.status, attendance, outcome
booking.restoredA 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_changedAnother host takes the call at the same time: a Hub move or swap, a transfer claim, or offboarding.host
booking.confirmedThe prospect confirms, or a member or the API marks the call confirmed. The first confirmation wins, so confirming again fires nothing.confirmation
booking.unconfirmedA 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.updatedAnother of the booking's own fields changes: free, guest_emails or conferencing.The fields that changed
booking.prospect_joinedThe prospect first joins the call.
booking.host_joinedThe host first joins the call.
booking.outcome_recordedThe call's outcome is written or changed, other than by a cancel.outcome, attendance
submission.createdA prospect's first answers on a form are saved.
submission.disqualifiedThe answers disqualify the prospect.
submission.abandonedA 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.blockedThe spam gate refuses the prospect.
submission.completedThe prospect finishes a standalone form, which books nothing.status
submission.bookedThe prospect picks a time. booking.created fires for the booking in the same change.status
submission.deletedIts form is deleted, which deletes its answers.
prospect.createdA new prospect from a form, a booking, or the HubSpot contact sync where the workspace lets it create prospects.
prospect.updatedA prospect's name, email, phone or spam mark changes.The fields that changed
note.createdA member adds a note in the app, or the API adds one.
note.updatedA note's text changes.content
note.deletedA note is deleted.
  • One change makes one event per object. A Hub move that changes the host and the time is one booking.rescheduled with host in data.previous. A booking from a form changes two objects, so it sends booking.created and submission.booked.
  • booking.created fires when the booking is saved, with conferencing.status pending. booking.updated follows once the Zoom meeting exists.
  • A *.deleted event's data.object holds only id, object and deleted: true. Calvana never deletes a prospect today, so there is no prospect.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. attendance moves from upcoming to unknown when 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:

booking.rescheduled
{
  "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" }
    }
  }
}
FieldMeaning
idThe event's ID, also sent as the webhook-id header. It stays the same on every retry and every endpoint, so dedupe on it.
typeThe event type. An open enum.
api_versionThe endpoint's major version, which decides the shape of data.object
timestampWhen Calvana recorded the change, in UTC with milliseconds
revisionThe object's revision after this change. It only grows, and can skip numbers. Keep the highest per object and drop anything older.
testTrue only for test events, which have made-up IDs and aren't in the event log
workspace_idThe workspace the event belongs to, for a receiver that serves several
actorWho made the change, below
data.objectThe full object after the change
data.previousThe 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 GET and 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.
  • links and resume_url are null unless the endpoint's owner holds links: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 revision per object, or read the object again.

Actor

Every event names who made the change. All five fields are always there:

actor
{ "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.

Booking link
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
booking.created
{
  "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

WhereField
Every booking.* event: created, rescheduled, cancelled, confirmed and the restdata.object.url_params
Every submission.* event, from the first captured answers ondata.object.url_params
GET /v1/bookings/{id}, GET /v1/submissions/{id} and their listsurl_params
Zapierattribution__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: %2B is +, 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, so visitorId stays visitorId.
  • Calvana's own keys aren't in url_params, in any letter case. via is the booking's channel, and rep and setter pick people. The prefill keys first_name, last_name, email, phone, phone_number and tel become answers. The embed keeps form, eventId, type, preview, view, call and calvana_call for 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 through POST /v1/bookings keeps the url_params your server sends, under the same rules.

Counting each booking once

  • The event id (the webhook-id header) stays the same on every retry. Drop a delivery whose ID you have seen.
  • A booking fires booking.created once, and its data.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_id in url_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.

HeaderValue
webhook-idThe event ID, evt_...
webhook-timestampUnix seconds when this attempt was signed
webhook-signaturev1, and a base64 HMAC-SHA256. During a secret rotation, two of them separated by a space.
user-agentCalvana-Webhooks/1 (+https://calvana.com/docs/api/webhooks)
content-typeapplication/json
  • The signed content is {webhook-id}.{webhook-timestamp}.{body}, keyed with the secret's part after whsec_, 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-timestamp more 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

verify-calvana-webhook.mjs
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);
}
Using it
// 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

verify_calvana_webhook.py, Python 3.9 or newer
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")
Using it
# 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.

Node
// npm install standardwebhooks
import { Webhook } from "standardwebhooks";

const event = new Webhook(secret).verify(rawBody, headers);
Python
# 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

Calvana
Your endpoint
HTTPS URL
A booking changes, and the event is saved with it
1. Attempt 1, at once, from Calvana to Your endpoint
Signed POST
2. 500, or no answer in 10 s, from Your endpoint to Calvana
Waits 5 s, then 5 min, 30 min, 2 h and longer
3. Attempt 2, from Calvana to Your endpoint
Same webhook-id, new signature
4. Any 2xx: delivered, from Your endpoint to Calvana
Calvana sends each event at once and retries a failed delivery up to 9 more times over about three days. The first 2xx ends it.
Your endpoint answersCalvana
Any 2xx within 10 secondsMarks the delivery succeeded and ignores the response body
Nothing within 3 seconds to connect or 10 seconds in allCounts a failure and retries
429, 5xx, a connection error or a TLS errorCounts a failure and retries
Another 4xxCounts a failure and retries, since a 400 is often a bug you fix and redeploy
A 3xx redirectCounts a failure without following it. The delivery log says to update the URL.
410 GoneDisables the endpoint at once and emails its owners
Retry-After on a 429 or 503Waits 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.

AttemptAfter the one beforeAfter the event
1At once0
25 seconds5 seconds
35 minutesAbout 5 minutes
430 minutesAbout 35 minutes
52 hoursAbout 2.6 hours
65 hoursAbout 7.6 hours
710 hoursAbout 17.6 hours
814 hoursAbout 31.6 hours
920 hoursAbout 51.6 hours
1024 hoursAbout 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_reason is manual, failing, gone (it answered 410), owner_revoked (its key was revoked) or version_retired. It is an open enum.

Replay and catching up

  • replay makes 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.
  • retry sends one delivery again now, even one that succeeded.
  • test sends 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.
Replay everything since midnight
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 422 endpoint_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.