Publish a batch of Realtime events
POST
/v1/realtime/apps/{realtime_app_id}/batch-events
curl -X POST "https://us1.platform.bird.com/v1/realtime/apps/{realtime_app_id}/batch-events" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Publishes up to 10 events (each to one channel) in a single request.
Corpo da requisição
events
array of object
obrigatório
Up to 10 events per batch.
Mostrar parâmetros secundários
events.event
string
obrigatório
The event name clients bind to. Application event names are free-form; the bird: and bird_internal: prefixes are reserved for the protocol and rejected.
events.channel
string
obrigatório
A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with private- or presence- for authenticated channels.
events.data
Arbitrary JSON payload delivered as the event data — an object, array, or scalar. Cap: 10 KB serialized.
events.exclude_connection_id
string
Exclude this connection from delivery, to avoid echoing a change back to the client that triggered it. The value is the client's connection id, assigned when its connection is established.
events.include
array of string
Attributes of this event's channel to return alongside the publish (same semantics and validation errors as on the channel endpoints). Requesting attributes counts as one additional message toward usage.
Payload de resposta
data
array of object
Per-event channel attributes at publish time, present only when at least one event asked for them via include. Positional: one item per event, in request order.
Mostrar atributos secundários
data.member_count
integer
Distinct members (presence channels only; requires include=member_count).
data.connection_count
integer
Connections currently subscribed to this channel (requires include=connection_count and the app's connection-counting flag). Channel-scoped — distinct from the app-wide peak connections metric.
data.channel
string
obrigatório
A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with private- or presence- for authenticated channels.