Submit a customer event
Records one thing that happened with a customer outside a Callens call — a message, an order, a note — from any system. One event per request. Callens recognises the customer from the identifiers in `customer` and stores the event on that customer. `event.content` is kept as descriptive text and is never parsed into fields. Sending the same `event.source` and `event.external_id` again returns the stored event and writes nothing, so the id must be the same on every retry of one event. Call this from a server you control and never from a browser or a mobile app: the response says whether an identifier already belongs to one of your customers and returns that customer's id, so a key with the `events` scope must not be readable by an anonymous client.
Records one thing that happened with a customer outside a Callens call — a message, an order, a note — from any system. One event per request. Callens recognises the customer from the identifiers in customer and stores the event on that customer. event.content is kept as descriptive text and is never parsed into fields. Sending the same event.source and event.external_id again returns the stored event and writes nothing, so the id must be the same on every retry of one event. Call this from a server you control and never from a browser or a mobile app: the response says whether an identifier already belongs to one of your customers and returns that customer's id, so a key with the events scope must not be readable by an anonymous client.
Authorization
ApiKey eventsAuthorization: Bearer clk_{tenant_id}_{secret}. The header X-Api-Key carrying the same value is also accepted, for integration platforms that cannot set an Authorization header. Keys are minted in the Callens dashboard.
In: header
Scope: events
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/customer-events" \ -H "Content-Type: application/json" \ -d '{ "customer": { "phone": "+201001234567", "email": "ahmed@example.com", "external": [ { "namespace": "shopify", "id": "82931" } ], "name": "Ahmed Mohamed" }, "event": { "type": "message_received", "channel": "whatsapp", "occurred_at": "2026-10-04T14:32:00Z", "content": "ممكن أعرف السعر؟", "source": "n8n", "external_id": "wamid.HBgMMjAxMDAxMjM0NTY3" } }'{ "success": true, "message": "Event already recorded.", "data": { "id": "string", "customer_id": "string", "identity": { "matched_on": "phone", "customer_created": true, "conflict": true } }}