> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theomnibot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Connected Channels via the ChatbotX REST API

> Use GET /api/v1/channels to list all connected messaging channels in your ChatbotX workspace, including the channel type and current connection status.

Channels (also called inboxes) represent the messaging platforms connected to your ChatbotX workspace, such as WhatsApp, Messenger, Instagram, Telegram, and more. Use this endpoint to list all connected channels along with their type and current connection status. This is useful for mapping channel IDs when creating contacts, broadcasts, or routing rules.

<Info>
  **GET** `/api/v1/channels`
</Info>

## Query Parameters

<ParamField query="page" type="integer">
  The page number to retrieve. Must be `1` or greater. Defaults to `1`.
</ParamField>

<ParamField query="perPage" type="integer">
  Number of channels to return per page. Must be `1` or greater.
</ParamField>

<ParamField query="includes" type="array">
  Optional array of related resources to include in the response.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://app.chatbotx.io/api/v1/channels?page=1&perPage=20' \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.chatbotx.io/api/v1/channels"

  params = {"page": 1, "perPage": 20}
  headers = {"Authorization": "Bearer <token>"}

  response = requests.get(url, params=params, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const options = {
    method: 'GET',
    headers: { Authorization: 'Bearer <token>' }
  };

  fetch('https://app.chatbotx.io/api/v1/channels?page=1&perPage=20', options)
    .then(res => res.json())
    .then(res => console.log(res))
    .catch(err => console.error(err));
  ```
</CodeGroup>

## Response

Returns `200 OK` with a `data` array of channel objects and a `pageCount` for pagination.

### Response Fields

<ResponseField name="data" type="array" required>
  Array of channel objects connected to the workspace.

  <Expandable title="data item fields">
    <ResponseField name="id" type="string" required>
      Unique identifier for the channel.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Display name of the channel or inbox.
    </ResponseField>

    <ResponseField name="channel" type="string" required>
      The messaging platform type. Common values include `messenger`, `whatsapp`, `instagram`, `telegram`, `webchat`, and `email`.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      The current connection status of the channel, such as `connected` or `disconnected`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pageCount" type="number" required>
  The total number of pages available based on the current `perPage` value.
</ResponseField>

### Example Response

```json theme={null}
{
  "data": [
    {
      "id": "ch_001",
      "name": "WhatsApp Business",
      "channel": "whatsapp",
      "status": "connected"
    },
    {
      "id": "ch_002",
      "name": "Facebook Page Inbox",
      "channel": "messenger",
      "status": "connected"
    },
    {
      "id": "ch_003",
      "name": "Instagram DMs",
      "channel": "instagram",
      "status": "disconnected"
    }
  ],
  "pageCount": 1
}
```
