Chatrixa Developers

Webhooks

Chatrixa pushes events to your HTTPS endpoint as they happen: messages, delivery status, contacts, groups, auto-replies, calls and template changes. Configure endpoints in Settings → Webhooks (https://chatrixa.com/settings/webhooks, organization owners only). Every delivery is signed, sent from a background queue (a slow endpoint never slows Chatrixa down), retried on failure and protected by a circuit breaker.

Envelope

Every delivery is a POST with Content-Type: application/json and this body:

{
  "event": "contact.created",
  "event_id": "6f0e9a3e-5a39-4d26-9d2a-0a8f7c1b2d11",
  "delivered_at": "2026-11-09T10:15:01+00:00",
  "organization_id": 42,
  "data": { }
}
Field Meaning
event Dotted event name, see the catalogue below.
event_id UUID shared by every endpoint that receives this event. Deduplicate on it.
delivered_at When Chatrixa produced the delivery (ISO 8601).
organization_id Your organization.
data The event payload. New keys may be added; ignore keys you do not know.

Headers: X-Chatrixa-Signature, X-Chatrixa-Event, X-Chatrixa-Event-Id, X-Chatrixa-Delivered-At and User-Agent: Chatrixa-Webhooks/1.0, plus any static headers you configured on the endpoint.

Verify the signature

X-Chatrixa-Signature is sha256= followed by the hex HMAC-SHA256 of the raw request body using the signing secret shown once when you create the endpoint. Verify before parsing the JSON and compare in constant time.

$raw = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $raw, $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_CHATRIXA_SIGNATURE'] ?? '')) {
    http_response_code(401);
    exit;
}
const crypto = require('crypto');
// Use a raw-body parser (express.raw) so the bytes are exactly what was signed.
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(req.get('X-Chatrixa-Signature') || ''));

Delivery, retries and the circuit breaker

Subscribe to exact names, to a prefix such as message.* or template.*, or to *.

Event catalogue

Event Fires when
message.received An inbound WhatsApp message arrived.
message.sent An outbound message was sent.
message.status.update A message status changed (sent, delivered, read, failed).
contact.created / contact.updated / contact.deleted A contact was created, changed or removed.
group.created / group.updated / group.deleted A contact group was created, changed or deleted.
autoreply.created / autoreply.updated / autoreply.deleted An auto-reply rule was created, changed or deleted.
call.event A WhatsApp call update from Meta arrived (connect, status, terminate).
template.status_updated A template status changed (approved, rejected, paused, ...).
template.category_updated A template category changed (for example re-classified by Meta).
order.paid / order.fulfilled / order.cancelled / order.refunded ShopFlow order lifecycle (ShopFlow users only).
webhook.test Sent by the "Send test event" button.

Payloads

{
  "template": {
    "uuid": "9b1e7f44-3c1a-4d0e-8f1b-2a7c5d6e8f90",
    "meta_id": "1234567890",
    "name": "order_confirmation",
    "language": "en_US",
    "status": "REJECTED",
    "category": "UTILITY"
  },
  "change": { "field": "status", "previous": "PENDING", "new": "REJECTED", "reason": "INVALID_FORMAT" },
  "source": "meta_webhook",
  "occurred_at": "2026-11-09T10:15:00Z"
}

change.field is status or category; source is meta_webhook or sync. Payload fields are only ever added, never renamed or removed.

Migrating from the legacy Webhooks module

The older "Webhooks" developer tool (/developer-tools/webhooks) posted { "event", "data" } unsigned. It still works and now sends from the background queue too, with the same body. Delivery stays at most once, as before: it is retried (up to 3 attempts, 10 s, 1 min, 5 min apart) only when your endpoint could not be reached or answered 429 or 503; any other answer is final. Each delivery carries an X-Chatrixa-Delivery-Id header that stays the same on every attempt, so you can drop duplicates. It is unsigned and has no delivery log. To migrate:

  1. Create an endpoint in Settings → Webhooks subscribed to the same events.
  2. Read the payload from data in the new envelope; the event names and data content are the same as before.
  3. Verify X-Chatrixa-Signature, then delete the legacy URL. While both are configured you receive each event twice.