Webhooks
Receive real-time event notifications to your server when things happen in your 6X account.
Webhooks
Instead of polling the API, webhooks push data to your server the moment something happens in your 6X account. When an event fires, 6X sends an HTTP POST request to your registered endpoint with a signed JSON payload.
Setting up a webhook
- Log into your business dashboard at app.6xcom.com/dashboard.
- Go to Webhooks in the sidebar.
- Click Add Endpoint, enter your server URL, and select the events you want to receive.
- Copy your Signing Secret — you will need this to verify incoming requests.
Available events
| Event | Fired when |
|---|---|
call.answered | An inbound call is answered by an agent |
call.missed | A call goes unanswered |
call.ended | Any call ends |
chat.ended | Chat conversation ended and session saved |
ticket.purchased | An event ticket is purchased |
gift_card.redeemed | A gift card is redeemed |
staff.clocked_in | A staff member clocks in |
staff.clocked_out | A staff member clocks out |
leave.requested | A leave request is submitted |
leave.approved | A leave request is approved |
flash_verification.completed | A flash-call reachability check (via /api/v1/voice/flash-verify) finishes |
Payload structure
Every webhook delivers the same envelope regardless of event type:
{
"event": "call.answered",
"timestamp": "2026-06-21T08:30:00+00:00",
"business_id": 42,
"data": {
"call_id": 198,
"direction": "inbound",
"caller": "+447911123456",
"duration": 120,
"status": "answered",
"started_at": "2026-06-21 08:28:00"
}
}
Verifying the signature
Every request includes an X-6X-Signature header — an HMAC-SHA256 of the raw request body signed with your endpoint secret. Always verify this before processing the payload.
// PHP example
$payload = file_get_contents('php://input');
$signature = hash_hmac('sha256', $payload, $yourSigningSecret);
if (!hash_equals($signature, $_SERVER['HTTP_X_6X_SIGNATURE'] ?? '')) {
http_response_code(401);
exit('Invalid signature');
}
$event = json_decode($payload, true);
// Node.js example
const crypto = require('crypto');
const sig = crypto.createHmac('sha256', signingSecret)
.update(rawBody)
.digest('hex');
if (sig !== req.headers['x-6x-signature']) {
return res.status(401).send('Invalid signature');
}
Responding to a webhook
Your endpoint must return a 2xx HTTP status within 10 seconds. If it does not, 6X marks the delivery as failed and retries up to 3 times with a 60-second backoff between attempts.
Delivery logs
Every delivery attempt is logged. Go to Webhooks in your dashboard, then click Logs next to any endpoint to see the full delivery history including response codes, response body, and retry attempts.
Testing your endpoint
Click Test next to any registered endpoint to send a webhook.test event immediately. Use this to confirm your server is receiving and verifying requests correctly before going live.
Limits
| Limit | Value |
|---|---|
| Max endpoints per business | 5 |
| Delivery timeout | 10 seconds |
| Retry attempts | 3 |
| Retry backoff | 60 seconds |
Request headers sent by 6X
| Header | Value |
|---|---|
Content-Type | application/json |
X-6X-Signature | HMAC-SHA256 of the raw request body |
X-6X-Event | The event name e.g. call.answered |
User-Agent | 6X-Webhooks/1.0 |