Event Sinks API
An event sink streams the platform event taxonomy — the samemessage.*, call.*, … events the per-event webhooks fan out — to infrastructure you already run. Instead of standing up an HTTP receiver per webhook, point a sink at your own Kafka topic or a batch HTTP collector and consume every subscribed event from one place.
Two transports are available, addressed by kind:
kafka— once delivery ships, events will be produced to a topic on your brokers. Each event will carry a deterministic partition key, so every event for one contact or conversation lands on the same partition and stays ordered.http_batch— once delivery ships, events will be POSTed to your HTTPS collector as a JSON array, flushed at a configurable batch size.
/api/v1/developer/event-sinks
Authentication: API key (X-API-Key) or session JWT. Requires an owner, admin, or developer role.
{kind} is kafka or http_batch. Any other value returns 404.
The credential is write-only
The secret credential — a Kafka SASL password or an HTTP bearer token — is encrypted at rest and is never returned. A read surfaces acredentials_configured boolean instead. To set or rotate it, PATCH a credentials value; to clear it, PATCH credentials: "".
Read a sink
Response fields
The
last_* fields are run status only — they are read-only and ignored if sent in a PATCH. Until the delivery worker ships they always read null (the values shown above are illustrative of the eventual shape, not live output).
Configure a Kafka sink
Configure an HTTP-batch sink
url must be https and resolve to a public host — private and metadata addresses are rejected. Once delivery ships, the sink will POST a JSON array of event envelopes (up to max_batch_size per request) with Content-Type: application/json.
PATCH is a merge: only the fields you send are written, so you can flip enabled or rotate credentials without resending the whole config. The destination.kind must equal the path {kind} — a Kafka topic config cannot be stored under http_batch. The response is the resulting config in the same shape as a read.
See also
- Webhooks — per-event HTTP push of the same taxonomy
- Events API — read or live-stream a bounded recent-event window