Webhooks
Receive signed JSON events from Askocto when conversations, leads, tickets and sources change, and verify each delivery with HMAC-SHA256.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
A webhook is an HTTPS endpoint on your server that Askocto calls when something happens in your workspace. Use webhooks to update a CRM when a lead is captured, notify a team channel on a handoff, or keep an internal system in sync with tickets.
Add a webhook
- Open Workspace Settings > Integrations > Webhooks.
- Select Add webhook.
- Enter the public HTTPS URL of your endpoint.
- Choose the events to receive.
- Select Save and copy the signing secret. You need it to verify deliveries.
You should see the webhook listed with its events and a recent deliveries view that shows the status of each attempt.
Events
| Event | Sent when |
|---|---|
conversation.started |
A customer starts a conversation. |
conversation.resolved |
A conversation is marked resolved. |
conversation.handoff |
The agent passes a conversation to your team. |
lead.captured |
The agent collects a lead. |
ticket.created |
A ticket is created in the Helpdesk. |
ticket.updated |
A ticket changes status, priority, assignee, tags or content. |
source.trained |
A source finishes training. |
Delivery format
Each delivery is a JSON POST. Two headers identify it.
| Header | Value |
|---|---|
X-Octo-Event |
The event name, such as ticket.created. |
X-Octo-Signature |
HMAC-SHA256 of the raw request body, using your webhook secret, as a hex string. |
An example body for ticket.created:
{
"id": "evt_8a1c",
"event": "ticket.created",
"createdAt": "2026-03-14T09:30:00Z",
"data": {
"id": "tkt_5d1",
"subject": "Damaged item in order A-1042",
"status": "open",
"priority": "high",
"channel": "email",
"contactId": "con_77"
}
}
Verify the signature
Compute the HMAC over the raw bytes of the body, before any JSON parsing, and compare it with the header in constant time.
import { createHmac, timingSafeEqual } from "node:crypto"
export function isValid(rawBody, signature, secret) {
const expected = createHmac("sha256", secret).update(rawBody).digest("hex")
const a = Buffer.from(expected)
const b = Buffer.from(signature ?? "")
return a.length === b.length && timingSafeEqual(a, b)
}
Reject any request that fails the check with status 401.
Respond and retry
Return a 2xx status quickly, then process the event in the background. If your endpoint times out or returns another status, Askocto retries the delivery with backoff. Retries can deliver the same event twice, so store the event id and ignore repeats.
Warning: Do not log the signing secret or full request bodies for events that contain customer data.
Next steps
- Send events to an assistant with MCP events.
- For workspaces with health data, read HIPAA webhooks.
- Read the same data on demand with API integration.