<Intro>

<EndpointHeader />

<Description>

Lists the app's currently occupied channels, optionally filtered by name prefix.

</Description>

</Intro>

<Parameters in="query">

<Parameter name="prefix" type="string">

<Description>

Only channels whose name starts with this prefix (e.g. "presence-").

</Description>

</Parameter>

<Parameter name="include" type="array">

<Description>

Per-channel attributes to include. Repeatable. Requesting `member_count` without a presence-channel `prefix`, or `connection_count` when the app's connection-counting flag is off, returns a validation error (400).

</Description>

</Parameter>

</Parameters>

<Payload kind="response">

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

<Description>

The occupied channels, sorted by name.

</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="name" 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>