Developer docs menu

Webhooks

Get signed events for emails, videos, sequences, hot leads and CRM exports as they happen.

Team webhooks are set up by a team owner or admin on the Team page. Teams are included on the Gold, Platinum and Managed plans.

Set up a webhook

  1. Open Team in CRMCoPilot and go to the Webhooks card.
  2. Add your endpoint URL and pick the events you want. The URL must be https, publicly reachable, up to 500 characters, with no username or password in it.
  3. Copy the signing secret (whsec_…). It's shown once; you can roll it later, which shows a new one.
  4. Click Send test to get a ping event.

A team can have up to 5 webhooks. Each covers the activity of every rep on the team.

What we send

Each event is a POST with a JSON body:

HeaderValue
Content-Typeapplication/json
User-AgentCRMCopilot-Webhooks/1.0
X-CRMCopilot-EventThe event type, e.g. email.opened
X-CRMCopilot-Event-Idevt_…, the same as id in the body. Use it to drop duplicates.
X-CRMCopilot-DeliveryThe delivery attempt's id (shown in the delivery log)
X-CRMCopilot-Signaturet=<unix time>,v1=<hex HMAC-SHA256>; see Verify the signature
Body{
  "id": "evt_3f9c2a7d1b8e4c6fa0d5e2b19c7a4f10",
  "type": "email.opened",
  "created_at": "2026-12-05T15:04:11.482913+00:00",
  "team": {
    "id": 12,
    "name": "Northwind Sales"
  },
  "user": {
    "id": 407,
    "name": "Priya Nair",
    "email": "[email protected]"
  },
  "data": {
    "email_id": 88213,
    "type": "one_to_one",
    "to": "[email protected]",
    "subject": "Quick idea for Acme's SDR ramp",
    "lead_name": "Jordan Lee",
    "lead_company": "Acme Inc",
    "sent_at": "2026-12-05T14:51:02+00:00",
    "video_id": null,
    "sequence_enrollment_id": null,
    "opens": 1,
    "first_opened_at": "2026-12-05T15:04:10+00:00"
  }
}

user is the rep the event belongs to. A ping has only team.id, no user, and data is {"message": "Test event from CRM CoPilot"}.

Verify the signature

Compute an HMAC-SHA256 with your signing secret over <t>.<raw body> (the t value, a dot, then the body exactly as received) and compare it, in constant time, to v1. Reject events whose t is more than a few minutes old.

Node.jsimport crypto from "node:crypto";

// rawBody: the request body exactly as received (a Buffer or string), before JSON parsing.
export function verifyCrmCopilot(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(parts.v1 || "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Pythonimport hashlib, hmac, time

def verify_crmcopilot(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t = int(parts.get("t", "0"))
    if abs(time.time() - t) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))

Delivery and retries

  • Respond with any 2xx within 10 seconds. Anything else, including a redirect, counts as a failure. We don't follow redirects.
  • Retries: after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours: 8 attempts over about 1.8 days.
  • At least once, in any order. You may get an event twice or out of order. Drop duplicates by id and use created_at for ordering.
  • Auto-off: after 50 failed attempts in a row the webhook is turned off, pending deliveries are cancelled, and the team owner gets an email. Turning it back on resets the count.
  • Delivery log: the Team page shows the last 25 deliveries per webhook and lets you retry one. Deliveries are kept for 30 days.

Events

EventWhen
email.sentA rep's email went out (one-to-one, scheduled or sequence).
email.openedThe first open of a tracked email.
video.recordedA rep recorded a video.
video.viewedSomeone watched a video.
video.completedSomeone watched a video to the end.
video.rewatchedSomeone watched a video again.
video.booking_clickedSomeone clicked the booking link on a video page.
sequence.enrolledSomeone was added to a sequence.
sequence.repliedSomeone in a sequence replied.
sequence.completedSomeone finished a sequence.
sequence.stoppedA sequence stopped for someone (including failures; reason says why).
lead.hotA hot-lead alert: reply, booking click, booked meeting, long or repeat video watch, repeated opens.
lead.exportedA lead reached the CRM with a buying-signal note. Once per person record.
pingSent by the Send test button.

lead.hot kind is one of reply, alfred_reply, booking_click, meeting_booked, video_completed, video_long, video_rewatch or opens. There's at most one alert per person per kind every 12 hours, and a rep can turn off webhooks for their own hot-lead alerts. scores appears once the lead has been scored; its fields may grow, so read the ones you need.

lead.exported rows match the GET /exports endpoint, which you can use to backfill.

Email type is one_to_one, scheduled or sequence.

video.* data{
  "video_id": 3310,
  "lead_name": "Jordan Lee",
  "lead_email": "[email protected]",
  "lead_company": "Acme Inc",
  "view_url": "https://…",
  "duration_sec": 74,
  "plays": 1,
  "completions": 1,
  "max_percent": 100,
  "booking_clicks": 0,
  "created_at": "2026-12-04T17:00:00+00:00",
  "first_viewed_at": "2026-12-05T09:12:00+00:00",
  "last_viewed_at": "2026-12-05T09:13:20+00:00"
}
sequence.* data{
  "enrollment_id": 9021,
  "sequence_id": 77,
  "sequence_name": "Q4 SDR ramp",
  "recipient_email": "[email protected]",
  "recipient_name": "Jordan Lee",
  "status": "replied",
  "current_step": 2,
  "steps_total": 4,
  "reason": null,
  "created_at": "2026-11-28T14:00:00+00:00"
}
lead.hot data{
  "alert_id": 5512,
  "kind": "video_completed",
  "label": "Watched your video",
  "name": "Jordan Lee",
  "company": "Acme Inc",
  "title": "VP Sales",
  "email": "[email protected]",
  "linkedin_url": "https://www.linkedin.com/in/jordan-lee-example",
  "domain": "acme.example",
  "detail": "Watched your whole video",
  "source": "copilot",
  "occurred_at": "2026-12-05T09:13:20+00:00",
  "created_at": "2026-12-05T09:13:21+00:00",
  "view_url": "https://…",
  "conversation_url": null,
  "scores": {
    "engagement": 82,
    "intent": 64,
    "fit": 71,
    "priority": 77,
    "next_action": "Call today",
    "…": "…"
  }
}
lead.exported data{
  "finding_id": 4410,
  "autopilot_id": null,
  "agent_id": 18,
  "run_id": null,
  "person": "Jordan Lee",
  "email": "[email protected]",
  "company": "Acme Inc",
  "domain": "acme.example",
  "crm": "zoho",
  "crm_record_module": "Leads",
  "crm_record_id": "5843000001234567",
  "note_id": "5843000009876543",
  "note_status": "done",
  "why_now": "Hiring two SDRs after a Series B.",
  "signals": [
    {
      "type": "hiring_sales",
      "label": "Hiring SDRs",
      "detail": "2 SDR roles posted",
      "url": "https://acme.example/careers/sdr",
      "date": "2026-11-28"
    }
  ],
  "exported_at": "2026-12-05T12:00:00+00:00",
  "note_updated_at": "2026-12-05T12:00:03+00:00"
}

Personal webhooks (Settings)

Separately from team webhooks, a user can add a webhook under Settings → Webhooks and send leads to it by hand with the Send to webhook button, which appears next to the CSV download icon in search results and lists. This is meant for no-code tools such as Zapier, Make or n8n; see the Webhooks integration page.

  • Only the button sends to it. AutoPilots and agents don't; use team webhooks (lead.exported) or the Agent API for that.
  • Emails are unlocked first, using email credits, and people with no email found aren't sent.
  • Each lead is a separate POST of {"data": {…lead…}, "meta": {"timestamp": "…", "event_type": "record_update"}}. The lead's fields depend on where it was found, so map what arrives in your tool rather than relying on a fixed schema. data.email is a list.
  • Delivery: 30-second timeout, up to 3 tries 5 seconds apart, sent while you wait. There's no delivery log.
  • Requests carry an X-Webhook-Signature header, but the secret isn't shown in Settings, so you can't verify it yet. Treat the URL itself as the secret, or use team webhooks if you need signed events.

Inbound: Zoho Bookings

CRMCoPilot can also receive a webhook: when a meeting is booked in Zoho Bookings with someone you emailed, it stops their sequences and raises a Booked a meeting hot lead. Make the URL in Settings → Integrations → Zoho meetings (new webhook); it looks like https://production.crmcopilot.ai/api/zoho-bookings/zbk_…. The token in the URL is the secret, so keep it private. Call it from Zoho Flow, Zapier or anything that fires on Appointment booked.

Requestcurl -X POST "https://production.crmcopilot.ai/api/zoho-bookings/zbk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"booking_id":"ACM-00123","customer_email":"[email protected]","customer_name":"Jordan Lee","start_time":"2026-12-09T15:00:00-06:00","service_name":"Discovery call","status":"upcoming"}' 
  • JSON or form data. Nested keys work (customer.email is read as customer_email).
  • Required: the customer's email, as customer_email (or email, attendee_email, invitee_email).
  • Optional: name (customer_name, name), start (start_time, appointment_start_time; ISO 8601, DD-Mon-YYYY HH:MM:SS or YYYY-MM-DD HH:MM), id (booking_id, appointment_id), service (service_name), status (anything containing "cancel" is ignored).
ResponseMeaning
200 {"status":"ok","recorded":true}Meeting recorded.
200 {"status":"ok","recorded":false,"reason":"already recorded"}Duplicate; nothing changed.
200 {"status":"ignored",…}Cancelled booking, or not someone you emailed from CRMCoPilot.
400No customer email in the request.
404Unknown or removed webhook URL.

Last checked against the live code on 5 December 2026.

Shopping cart