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

# List channels

> List all channels for an organization with message counts



## OpenAPI

````yaml /api-reference/openapi.json get /channels
openapi: 3.1.1
info:
  description: >-
    The public Modem API. Authenticate with an organization API key:
    `Authorization: Bearer modem_…`.
  title: Modem API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.modem.dev/v1
security:
  - bearerAuth: []
paths:
  /channels:
    get:
      tags:
        - Channels
      summary: List channels
      description: List all channels for an organization with message counts
      operationId: channels.list
      parameters:
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: sourceName
          required: false
          schema:
            description: >-
              Filter channels by source (e.g., slack, discord). Omit for all
              sources.
            pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            title: Source Name
            type: string
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: search
          required: false
          schema:
            description: Search channels by name. Omit when not searching.
            minLength: 1
            title: Search
            type: string
        - allowEmptyValue: true
          allowReserved: true
          explode: true
          in: query
          name: ids
          required: false
          schema:
            description: >-
              Filter to specific channel IDs (e.g., to resolve names for a
              stored channel scope). Omit when not filtering by ID.
            items:
              format: uuid
              type: string
            maxItems: 100
            minItems: 1
            title: Channel IDs
            type: array
          style: deepObject
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: connectedOnly
          required: false
          schema:
            description: >-
              Only return channels whose backing integration is still connected.
              Currently filters GitHub repo channels to repositories with
              non-revoked access; other sources are unaffected. Omit to include
              all channels.
            title: Connected Only
            type: boolean
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: page
          required: false
          schema:
            default: 1
            description: The 1-based page number to return (default 1).
            exclusiveMinimum: 0
            title: Page
            type: integer
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: limit
          required: false
          schema:
            default: 50
            description: Maximum number of channels to return (default 50, max 100)
            exclusiveMinimum: 0
            maximum: 100
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        channelName:
                          description: Human-readable name of the channel.
                          title: Channel Name
                          type: string
                        context:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            User-provided context about the channel purpose and
                            how to prioritize messages. Used by LLM for message
                            grouping, topic extraction, and priority scoring.
                          title: Context
                        createdAt:
                          description: ISO 8601 timestamp of channel creation
                          format: date-time
                          title: Created At
                          type: string
                        description:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Optional description of the channel.
                          title: Description
                        id:
                          anyOf:
                            - format: uuid
                              type: string
                            - format: uuid
                              type: string
                        isConnected:
                          description: >-
                            Whether the source server/workspace is currently
                            connected (bot has not left)
                          title: Is Connected
                          type: boolean
                        lastSeenAt:
                          anyOf:
                            - format: date-time
                              type: string
                            - type: 'null'
                          description: >-
                            ISO 8601 timestamp of the most recent message in
                            this channel, or null if no messages
                          title: Last Seen At
                        messageCount:
                          description: Total number of messages in this channel
                          minimum: 0
                          title: Message Count
                          type: integer
                        serverName:
                          description: Human-readable name of the server/workspace.
                          title: Server Name
                          type: string
                        sourceChannelId:
                          description: Channel identifier in the source system.
                          title: Source Channel ID
                          type: string
                        sourceName:
                          description: Source system for the channel.
                          pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                          title: Source Name
                          type: string
                        sourceServerId:
                          description: >-
                            Identifier of the server/workspace in the source
                            system.
                          title: Source Server ID
                          type: string
                        updatedAt:
                          description: ISO 8601 timestamp of last channel update
                          format: date-time
                          title: Updated At
                          type: string
                      required:
                        - channelName
                        - context
                        - createdAt
                        - description
                        - id
                        - isConnected
                        - lastSeenAt
                        - messageCount
                        - serverName
                        - sourceChannelId
                        - sourceName
                        - sourceServerId
                        - updatedAt
                      type: object
                    type: array
                  limit:
                    description: The page size used for this response.
                    exclusiveMinimum: 0
                    type: integer
                  page:
                    description: The 1-based page number returned.
                    exclusiveMinimum: 0
                    type: integer
                  totalCount:
                    description: >-
                      Total number of items matching the query, across all
                      pages.
                    minimum: 0
                    type: integer
                required:
                  - data
                  - limit
                  - page
                  - totalCount
                type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request (validation failed).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key does not have access to this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
components:
  schemas:
    Error:
      properties:
        code:
          description: Machine-readable error code, e.g. `NOT_FOUND`.
          examples:
            - NOT_FOUND
          type: string
        data:
          description: Optional structured error details.
        defined:
          description: True if the error was declared in the procedure contract.
          type: boolean
        message:
          description: Human-readable error message.
          type: string
        status:
          description: HTTP status code.
          examples:
            - 404
          type: integer
      required:
        - code
        - defined
        - message
        - status
      type: object
  securitySchemes:
    bearerAuth:
      description: Organization API key (`modem_…`).
      scheme: bearer
      type: http

````