Application events
Record application events against contacts without changing their consent.
Send an event when something happens in your application. Its properties describe that occurrence, not the contact's permanent profile.
Send an event
Use a full-access API key. A sending-only key cannot record events or read their names.
POST /events/send takes Resend's shape, so Resend's SDKs and code work unchanged:
curl https://api.exx.sh/events/send \
-H "Authorization: Bearer $EXX_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-123-completed' \
-d '{
"event": "order.completed",
"email": "customer@example.com",
"payload": {"order_id": "123", "total": 42, "currency": "USD"}
}'In the exx SDKs it is events.send with Resend's arguments (exx.events.send({ event, email, payload }) in TypeScript). The response is 202 with {object: "event", event},
the event's name. event is the
name, payload (optional, an empty object when left out) the occurrence's properties.
Supply exactly one of email or contact_id; a contact ID must belong to the key's
project. Email uses the same normalization as contacts.
POST /events records the same event with exx's names and two extras: the occurrence time
and the IDs of what it recorded. Both endpoints share one service, so identity, consent,
idempotency, limits and permissions are the same.
curl https://api.exx.sh/events \
-H "Authorization: Bearer $EXX_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-123-completed-v2' \
-d '{
"name": "order.completed",
"email": "customer@example.com",
"properties": {"order_id": "123", "total": 42, "currency": "USD"}
}'Its response is 200 with {object: "event", id, contact_id}.
An unknown address creates an unsubscribed contact. An existing contact keeps its
subscription, double opt-in state and profile. Recording a purchase is not consent to
marketing. A newly created contact emits the usual contact.created webhook once.
Erased, erasing and suppressed identities are refused.
Retry safely
Keep the same Idempotency-Key and identical request body when retrying a request.
Within the idempotency window, a replay returns the original response (status and body),
without another activity row, registry increment or internal trigger. Each endpoint keeps
its own keys: the same key on /events and /events/send names two requests.
Reusing the key with a different body returns 409 invalid_idempotent_request. A request
still running with that key returns 409 concurrent_idempotent_requests. A transient
failure rolls back its work and frees the key for retry; observe Retry-After on a rate
limit response. The idempotency window is 24 hours.
Properties and time
properties (payload on /events/send) is required on /events and must be an object of at most 100
keys and 64 KiB as JSON. Values can include nested JSON. The
whole request may be 128 KiB. Do not send secrets or unnecessary personal data. These values are
stored only with this occurrence: properties.plan does not set the contact's declared
plan property, and properties.unsubscribed cannot change a subscription.
name (event on /events/send) starts with an ASCII letter, has up to 100 characters,
and uses only letters, digits, _, . and - (order.completed, trial-started). A
project can register up to 1,000 distinct names; a new name beyond
that returns 422, while known names keep working.
occurred_at (only on /events) is an optional RFC 3339 timestamp; omit it to use
receipt time. It can be up
to 365 days in the past and 5 minutes in the future.
A project records up to 20 events a second, with bursts of up to
100; beyond that the API returns 429 with Retry-After. Ingestion has
its own project bucket and does not spend email sending quota, though the regular API
request-rate limit still applies.
Event activity is kept for 365 days, counted from receipt rather than the supplied occurrence time. Contact erasure removes event activity and pending trigger pointers along with the contact.
See your event names
GET /events/names returns {object: "list", has_more, data}. Each item contains
name, lifetime count, first_seen and last_seen occurrence timestamps. Request
after=<last name> when has_more is true. A late older occurrence does not move
last_seen backward. This endpoint lists vocabulary and usage, not contacts or payloads.
The dashboard's Events page shows names, counts and last seen. Open a contact to see its application-event timeline, expand properties and compare occurrence and receipt times. Registry names and aggregate usage remain after an individual contact is erased.
event.received is internal trigger work for the workflow engine, not a customer
webhook. An event starts the workflows whose
trigger names it, once per event, and wakes the contact's runs waiting for it.