> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# List Channels

> Get all channels accessible to the current user

Retrieves a list of all channels that the authenticated user has access to, including DM channels, group channels, and standard channels.

## Authentication

Requires a valid user session. Channels must be enabled in the system configuration.

## Response

Returns an array of channel objects with metadata.

<ResponseField name="channels" type="array">
  Array of channel objects

  <Expandable title="Channel Object">
    <ResponseField name="id" type="string" required>
      Unique channel identifier
    </ResponseField>

    <ResponseField name="user_id" type="string" required>
      ID of the user who created the channel
    </ResponseField>

    <ResponseField name="type" type="string">
      Channel type: `standard`, `group`, or `dm`
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Channel name (empty for DM channels)
    </ResponseField>

    <ResponseField name="description" type="string">
      Channel description
    </ResponseField>

    <ResponseField name="is_private" type="boolean">
      Whether the channel is private (for group channels)
    </ResponseField>

    <ResponseField name="data" type="object">
      Additional channel data
    </ResponseField>

    <ResponseField name="meta" type="object">
      Channel metadata
    </ResponseField>

    <ResponseField name="access_grants" type="array">
      Access control grants for the channel
    </ResponseField>

    <ResponseField name="user_ids" type="array">
      Array of user IDs (for DM channels only)
    </ResponseField>

    <ResponseField name="users" type="array">
      Array of user objects with status (for DM channels only)
    </ResponseField>

    <ResponseField name="last_message_at" type="integer">
      Timestamp of the last message (epoch time in nanoseconds)
    </ResponseField>

    <ResponseField name="unread_count" type="integer">
      Number of unread messages for the current user
    </ResponseField>

    <ResponseField name="created_at" type="integer" required>
      Timestamp when the channel was created (epoch time in nanoseconds)
    </ResponseField>

    <ResponseField name="updated_at" type="integer" required>
      Timestamp when the channel was last updated (epoch time in nanoseconds)
    </ResponseField>

    <ResponseField name="updated_by" type="string">
      ID of the user who last updated the channel
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://your-domain.com/api/channels" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json"
  ```

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

  response = requests.get(
      "https://your-domain.com/api/channels",
      headers={"Authorization": "Bearer YOUR_TOKEN"}
  )

  channels = response.json()
  print(f"Found {len(channels)} channels")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  [
    {
      "id": "ch_abc123",
      "user_id": "user_123",
      "type": "standard",
      "name": "general",
      "description": "General discussion",
      "is_private": false,
      "data": {},
      "meta": {},
      "access_grants": [
        {
          "principal_type": "user",
          "principal_id": "*",
          "permission": "read"
        }
      ],
      "last_message_at": 1709567890123456789,
      "unread_count": 3,
      "created_at": 1709500000000000000,
      "updated_at": 1709567890123456789,
      "updated_by": "user_456"
    },
    {
      "id": "ch_dm789",
      "user_id": "user_123",
      "type": "dm",
      "name": "",
      "description": null,
      "is_private": null,
      "data": {},
      "meta": {},
      "access_grants": [],
      "user_ids": ["user_123", "user_456"],
      "users": [
        {
          "id": "user_123",
          "name": "Alice",
          "is_active": true
        },
        {
          "id": "user_456",
          "name": "Bob",
          "is_active": true
        }
      ],
      "last_message_at": 1709567890123456789,
      "unread_count": 0,
      "created_at": 1709500000000000000,
      "updated_at": 1709567890123456789
    }
  ]
  ```

  ```json 403 Forbidden theme={null}
  {
    "detail": "Channels are not enabled"
  }
  ```
</ResponseExample>
