Docs
Webhooks
Instead of polling, give us a URL and we POST a signed JSON event the moment something happens, like a lead replying.
Set up
Add an endpoint in the app under Settings, API & MCP, Webhooks, or with POST /v1/webhooks. The URL must be https and reachable on the public internet. You get a signing secret (whsec_...) once; store it. Use Send test to check your endpoint.
Events
| Event | When |
|---|---|
| message.received | A lead sent you a message. Warmup chats between your own numbers are left out. |
| lead.status_changed | A conversation's lead status changed (AI tag, the app, or the API). Has the old and new status and the source. |
| message.sent | A message to a lead left one of your numbers. |
| message.status_updated | A sent message was delivered or read. data.status has the new status. |
| number.status_changed | One of your numbers connected, disconnected or was banned. |
| webhook.test | Sent only by Send test. |
Payload
Every event has the same envelope. data depends on the type.
json
{
"id": "evt_4f8a0c2e9b1d4e6fa3c5b7d9e1f20a3b",
"type": "message.received",
"created_at": "2026-11-09T10:14:03.512Z",
"workspace_id": "7c1d9e2a-5b3f-4a8e-9d60-2f4b8c1e7a35",
"data": {
"conversation_id": "55ec3bba-6e17-4e88-ac43-eea015a2e0b5",
"contact_id": "cdb3cb46-30aa-49e7-b7f6-0849f552f697",
"contact_address": "971501234567",
"number_id": "b1267ac2-2818-4b30-8c84-ddb4608b7505",
"number_phone": "+971585550131",
"campaign_id": "eda51f33-4fee-439d-a11b-a2449f9fc7d1",
"message": {
"id": "1e13dcff-18bd-49b0-82a1-e948f98b9bf5",
"direction": "inbound",
"body": "Sounds good, send me the details",
"status": "received",
"created_at": "2026-11-09T10:14:02.981Z"
}
}
}Verify the signature
Each request has an Outreach-Camel-Signature header: t=<unix seconds>,v1=<hex>. v1 is the HMAC-SHA256 of <t>.<raw body> with your secret. Check it against the raw body (before parsing JSON), compare in constant time, and reject timestamps older than 5 minutes.
javascript
import crypto from "node:crypto";
import express from "express";
const app = express();
const SECRET = process.env.OC_WEBHOOK_SECRET; // whsec_...
// Use the raw body: the signature is over the exact bytes we sent.
app.post("/webhooks/outreach-camel", express.raw({ type: "application/json" }), (req, res) => {
const header = req.get("Outreach-Camel-Signature") ?? "";
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = crypto
.createHmac("sha256", SECRET)
.update(`${parts.t}.${req.body}`)
.digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
const valid =
fresh &&
parts.v1?.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
if (!valid) return res.status(400).send("bad signature");
const event = JSON.parse(req.body);
// Reply 2xx quickly, then do the work. Use event.id to skip duplicates.
res.sendStatus(200);
if (event.type === "message.received") {
console.log("Reply from", event.data.contact_address, ":", event.data.message.body);
}
});python
import hashlib, hmac, json, os, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ["OC_WEBHOOK_SECRET"].encode() # whsec_...
@app.post("/webhooks/outreach-camel")
def outreach_camel():
raw = request.get_data() # exact bytes we sent
parts = dict(p.split("=", 1) for p in request.headers.get("Outreach-Camel-Signature", "").split(","))
expected = hmac.new(SECRET, f"{parts.get('t')}.".encode() + raw, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts.get("t", 0))) < 300
if not (fresh and hmac.compare_digest(expected, parts.get("v1", ""))):
abort(400)
event = json.loads(raw)
if event["type"] == "message.received":
print("Reply:", event["data"]["message"]["body"])
return "", 200Delivery and retries
- Answer with any 2xx within 10 seconds. Do slow work after responding.
- If your endpoint fails or times out, we retry after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours.
- Events can arrive more than once or out of order. Use
idto skip duplicates andcreated_atto order them. - If every delivery to an endpoint fails for 3 days, we turn it off and email the workspace owner. Turn it back on in Settings.
- The last 10 deliveries per endpoint, with status codes and errors, are listed in Settings.