Send a broadcast
POST/v1/realtime/{project_id}/broadcast
Sends an event to all clients subscribed to a channel. Independent of Postgres — fan-out via NATS, then best-effort persistence.
Headers#
| Header | Required | Value |
|---|---|---|
apikey | yes | Project API key |
Authorization | yes | Bearer <JWT>. Its project_id must match the URL, otherwise 403 |
Content-Type | yes | application/json |
Bodysuit#
| Parameter | Type | Required | Description |
|---|---|---|---|
channel | string | yes | Target channel, necessarily prefixed with the project: {project_id}:{topic}. A channel that does not belong to the project is refused in 403. |
payload | object | yes | Event body, serializable JSON. Its size is limited by the configuration of the project. |
Body shape#
Attention
The body has only two fields: channel and payload. There is no event field at the top level — if your application wants one, put it in payload.
Access control and limits#
Attention
Authorization is based on the JWT: its project_id must match that of the URL, and the channel must have this same prefix. There is no policy table allow_broadcast. Three counters per project can respond 429: payload size, number of events, byte volume.
Last updated · Apr 15, 2026↗ Edit on GitHub↗ Report a problem