<Intro>

<EndpointHeader />

<Description>

Returns a single channel's occupancy and (on request) counts. Channels exist implicitly — a channel appears when the first connection subscribes and vanishes when the last one leaves — so this endpoint reports state, not existence: an unknown or never-used name returns 200 with `occupied: false`, never 404.

</Description>

</Intro>

<Parameters in="query">

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

<Description>

Attributes to include. Repeatable. Requesting `member_count` for a non-presence channel, 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="member_count" type="integer">

<Description>

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

</Description>

</Field>

<Field name="connection_count" type="integer">

<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="occupied" type="boolean" required>

<Description>

Whether at least one client is subscribed.

</Description>

</Field>

</Payload>