Skip to content
VaakyoDocs
Navigation
Open console →

Webhooks

Webhooks

Vaakyo posts each event of every call to your server as it happens, signed with a secret only you and Vaakyo know. Delivery happens outside the call, so a slow or broken endpoint never affects a live call.

Where events go

TargetSet up withReceivesSigned with
Workspace endpointsWebhooks in the consoleThe event types it subscribes to, for every call in the workspaceThe endpoint’s own secret
An agent’s webhook_urlThe agent’s Webhook & number tabThe lifecycle events of that agent’s callsThe workspace’s default secret
A campaign’s webhook_urlWebhook settings when you create a campaignThe lifecycle events of that campaign’s callsThe workspace’s default secret

All of them can be set. An event goes to every matching target.

Delivery runs in the background: Vaakyo saves each delivery and dispatches it asynchronously. Your endpoint’s speed never changes how the call sounds.

Register an endpoint

Add endpoints in the console under Webhooks (owners, admins and roles with the keys.manage permission). Endpoints are managed in the console only; they are not part of the REST API.

FieldDefaultRules
URLrequiredhttps, on the public internet: private, loopback, link-local and cloud-metadata addresses are refused when you save it and again on every delivery (a delivery to a host that resolves to one fails). Redirects are not followed. Up to 500 characters.
DescriptionemptyUp to 200 characters.
Eventsthe call lifecycleThe call lifecycle (call.queued, call.placed, call.started, call.ended, call.completed), or a list of event types from Webhook events. An endpoint can also list any of crm.updated, call.voicemail, call.rescheduled, call.transferred, call.transfer_status, tool.call, error and guardrail.violation. Other timeline events (such as user.turn) are never sent to webhooks.
ActiveonAn inactive endpoint gets nothing.

The endpoint’s signing secret (whsec_...) is shown once, when you add it; store it then. Later the console shows only a hint. A workspace can have up to 20 endpoints.

From the same page you can change, pause or delete an endpoint, and Send test posts one ping event straight away and shows your server’s response.

The request

Every delivery is a POST with a JSON body:

{
  "id": "evt_7d0c6f0f2b8e4b0a9c1e3f5a7b9d1e3f",
  "type": "tool.call",
  "created_at": "2026-10-01T09:15:04.512000+00:00",
  "workspace_id": "6df74233a1b04c2e9f8d7c6b5a4e3d2c",
  "call_id": "00b1d622a8f04f4f8f3a3c2d9e5b7a11",
  "agent_id": "1b81a241c0e44f5c9d1f0e2a7c3b9d10",
  "data": {
    "message": "check_availability",
    "level": "info",
    "latency_ms": null,
    "name": "check_availability",
    "args": {"doctor": "Dr Mehta", "date": "2026-10-02"},
    "url": "https://api.example.com/availability"
  }
}
FieldMeaning
idThe event id. The same event sent to two targets has the same id.
typeThe event type. See Webhook events.
created_atWhen the event happened, in UTC.
workspace_id, call_id, agent_idWhich call it belongs to.
data.messageA one-line description.
data.levelinfo, warning or error.
data.latency_msFor timing events, the latency; otherwise null.
data.*Fields specific to the event type.

Headers:

HeaderValue
Content-Typeapplication/json
User-AgentVaakyo-Webhooks/1.0
X-Vaakyo-EventThe event type.
X-Vaakyo-DeliveryThe delivery id (whd_...).
X-Vaakyo-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>

Verify the signature

The signature is an HMAC-SHA256 of the string <t>.<raw request body>, keyed with your secret (whsec_...).

  1. Read the raw body, before any JSON parsing.
  2. Split the header into t and v1.
  3. Reject the request if t is more than 5 minutes from now (this stops replays).
  4. Compute the HMAC and compare it to v1 in constant time.

Python

import hashlib
import hmac
import time


def verify(secret: str, header: str | None, raw_body: bytes, tolerance: int = 300) -> bool:
    parts = dict(item.split("=", 1) for item in (header or "").split(",") if "=" in item)
    timestamp, signature = parts.get("t", ""), parts.get("v1", "")
    if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)

Node

import crypto from "node:crypto";

export function verify(secret, header, rawBody, tolerance = 300) {
  if (typeof header !== "string") return false;
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
  const timestamp = Number(parts.t);
  if (!timestamp || Math.abs(Date.now() / 1000 - timestamp) > tolerance) return false;
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${parts.t}.`)
    .update(rawBody)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

In Express, read the raw body with express.raw({ type: "application/json" }) on the webhook route.

Respond

  • Respond with any 2xx within 10 seconds. Do slow work after you respond.
  • Redirects are not followed; a 3xx counts as a failure.
  • One attempt. Each delivery is sent once. Any other status, a timeout or a connection error makes it failed, and it is not sent again. Keep your endpoint up, and read missed calls from the API if you need them.
  • Order. Events are sent roughly in order. Sort by created_at if order matters.

Delivery log

Every delivery is logged. Read it in the console under Webhooks, or on the Logs → Webhooks tab (see Logs), filtered by endpoint, status, event type, call and time. Each delivery shows your server’s status code, how long it took to answer and when it was sent; open one for the request body and your last response. Deliveries are kept for 30 days.

Delivery statusMeaning
pendingNot sent yet.
deliveredYour server answered 2xx.
failedIt was not answered with 2xx, or the endpoint was deleted. It is not sent again.

Rotate a secret

Rotate an endpoint’s secret, or the default secret used for agents’ and campaigns’ webhook URLs, under Webhooks in the console. The new secret is shown once. The old secret stops working at once, so update your server first and keep accepting both secrets for a moment if you can.

Esc