Skip to content
Aurabase Logo
aurabase

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#

HeaderRequiredValue
apikeyyesProject API key
AuthorizationyesBearer <JWT>. Its project_id must match the URL, otherwise 403
Content-Typeyesapplication/json

Bodysuit#

ParameterTypeRequiredDescription
channelstringyesTarget channel, necessarily prefixed with the project: {project_id}:{topic}. A channel that does not belong to the project is refused in 403.
payloadobjectyesEvent 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.