Report site events
POST/site-events
This is how a connected site tells what happened on it — an order paid, a sign-up, an abandoned cart —, up to 100 events per call. It is what the WordPress plugin calls, and any custom platform holding a connected site's API key can call it too.
The site does not need to know which flows exist: it reports the event by name, and every
active, published flow with the site event trigger listening to that name receives it (at
most 20 flows per event, by priority), as do the runs waiting for it. In the flow, what
comes in data is available as {{trigger.<path>}} — {{trigger.order.total}} —,
alongside trigger.$event (id, name, occurred_at) and trigger.$site (id,
url, name).
Names. <source>.<object>.<what happened>, lowercase, 2 to 4 segments and up to 80
characters: wc.order.paid, wp.user.registered. The sources wp, wc, wcs, form
and fcrc are the plugin's catalog; your own integration's events go under custom —
custom.subscription.renewed.
Contact. The contact block goes through the same sync as POST /contacts/sync,
with its fields in snake_case and with triggers on: a new contact or an added tag start
the usual flows. Without a valid contact no flow starts — but an invalid contact block
does not refuse the event, which is recorded with the reason.
Answer. 202 means recorded and queued: no flow runs inside the request. Each event
answers for itself — an invalid one comes back in rejected, with its position and the
reason, without costing the rest of the batch; an id the site already reported counts
in duplicates and changes nothing. Delivery is "at least once": resending is safe. Each
event carries up to 64 KB between data and contact.
This route never answers 402: with the account blocked, events are accepted and
recorded without running flows, so the site does not pile up retries.
Idempotency. With the Idempotency-Key header, a repeat of the same call returns
the first answer, with Idempotent-Replayed: true. The same key with another body is
refused with 422 idempotency_key_reused; while the first request is still running, the
repeat gets 409 idempotency_in_progress.
Only a connected site's API key reports events — it comes with the events:write
permission. A regular API key gets 404 site_not_found.
Request
Responses
- 202
- 401
- 403
- 404
- 409
- 413
- 422
- 429
Events recorded. Where each one went is in accepted, duplicates or rejected.
Missing, malformed, unknown or revoked token (authentication), or a suspended
account (tenant_inactive).
A dashboard session instead of an API key (site_key_required), or an API key without the events:write permission (key_permission_denied).
The API key is not bound to a connected site (site_not_found). Connect the site again from the plugin.
The site is paused in the dashboard (site_paused); an event carries a site_url other than the address the site was connected at (site_url_mismatch, with that address in registeredUrl) — a copy of a site, such as a staging one, must be connected on its own, and the whole batch is refused; or a request with the same Idempotency-Key is still running (idempotency_in_progress).
The body is over 512 KB (payload_too_large). Split the batch.
Invalid body — events missing, empty or over 100 items (invalid_request, with issues) — or the same Idempotency-Key with another body (idempotency_key_reused). An invalid event does not refuse the batch: it comes back in rejected.
Rate limit exceeded (rate_limit).
Response Headers
Seconds to wait before retrying.
Which rate limit category applied — send, media or default.
Which bucket the other headers describe — key (the API key), session (the dashboard) or account (the account ceiling).
Request ceiling for this category in the current window.
Requests left in the current window.