<Intro>

<EndpointHeader />

<Description>

Publishes up to 10 events (each to one channel) in a single request.

</Description>

</Intro>

<Payload kind="request">

<Field name="events" type="array of object" required>

<Description>

Up to 10 events per batch.

</Description>

<FieldChildren kind="request">

<Field name="event" type="string" prefix="events." required>

<Description>

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.

</Description>

</Field>

<Field name="channel" type="string" prefix="events." required>

<Description>

A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with `private-` or `presence-` for authenticated channels.

</Description>

</Field>

<Field name="data" prefix="events.">

<Description>

Arbitrary JSON payload delivered as the event data — an object, array, or scalar. Cap: 10 KB serialized.

</Description>

</Field>

<Field name="exclude_connection_id" type="string" prefix="events.">

<Description>

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.

</Description>

</Field>

<Field name="include" type="array of string" prefix="events.">

<Description>

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.

</Description>

</Field>

</FieldChildren>

</Field>

</Payload>

<Payload kind="response">

<Field name="data" type="array of object">

<Description>

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.

</Description>

<FieldChildren kind="response">

<Field name="member_count" type="integer" prefix="data.">

<Description>

Distinct members (presence channels only; requires include=member_count).

</Description>

</Field>

<Field name="connection_count" type="integer" prefix="data.">

<Description>

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.

</Description>

</Field>

<Field name="channel" type="string" prefix="data." required>

<Description>

A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with `private-` or `presence-` for authenticated channels.

</Description>

</Field>

</FieldChildren>

</Field>

</Payload>