Events
Report Event
Tells us something happened to a customer. Every sequence or tag rule subscribed to that event name runs: sequences that stop on it end first, then tags are added or removed, then sequences that start on it enrol the contact (unless they opted out, and only into an active sequence). The contact is created if the number is new. Nothing subscribed is still a 200, with matched: false — you can send events before anyone has set up what they do. Only send events for people who agreed to hear from you: an event that starts a sequence is taken as their opt-in. Needs a full key.
POST/events
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Request body
- tostringrequired
- The customer's number, with or without the
+; spaces are fine. Matched to a contact by its digits; a new number creates a contact. - eventstringrequired
- What happened, as a name. Normalised and echoed back — lower case, anything but letters, digits,
.,-and_becomes a dot, 60 characters at most — so "Order Delivered" is stored asorder.delivered. Subscribe to the name that comes back. - dataobject
- Values to carry into the sequences this starts, for their templates to use — an order number, a courier. At most 20; each name 1–60 characters (a longer one is refused); values are text, numbers or true/false, stored as text and cut at 300 characters. An object or list as a value is refused.
- namestring
- The customer's name, if you have it. Used for a contact this call creates, or one with no name yet. Cut at 120 characters.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/events" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+1 415 555 0134",
"event": "order.delivered",
"name": "Priya Nair",
"data": {
"order": "10432",
"courier": "Delhivery"
}
}'Responses
| Status | Description |
|---|---|
200 | Recorded, and what it did. |
400 | The body is not JSON, to or event is missing, or data breaks a rule. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | The Katexs-Workspace header names a workspace that is unknown, is not one of your customers, or is not an org_… id. Always this one sentence, so a key cannot learn which ids exist in other accounts. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
500 | The event could not be recorded — also the answer when to has no digits at all. Safe to retry once fixed. |
Response fields
- okbooleanrequired
- The event was recorded.
- eventstringrequired
- The normalised name. Set your subscriptions up against this, not what you sent.
- contactstring | nullrequired
- The contact the event was recorded against (
cust_…), the id Get Contact takes. - startedintegerrequired
- Sequences this event enrolled the contact into.
- stoppedintegerrequired
- Sequences it took them out of.
- taggedintegerrequired
- Tags added to or removed from the contact.
- matchedbooleanrequired
- Whether anything was subscribed and acted.
- notestring
- Only when nothing acted: says nothing is subscribed to this event yet.
200 response
{
"ok": true,
"event": "order.delivered",
"contact": "cust_4e7b1c9d-2a6f-4385-b0d2-9f6a3e8c1b74",
"started": 1,
"stopped": 1,
"tagged": 0,
"matched": true
}Last updated November 2026 · Found a problem? Email support@katexs.com
