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

# List messages

> Returns a paginated list of messages in a channel, most recent first. The channelId
query parameter is required and must be a bare UUID (do not include the GetStream
'messaging:' prefix). A maximum of 100 messages are returned per page.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/messages
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/messages:
    get:
      tags:
        - Messages
      summary: List messages
      description: >-
        Returns a paginated list of messages in a channel, most recent first.
        The channelId

        query parameter is required and must be a bare UUID (do not include the
        GetStream

        'messaging:' prefix). A maximum of 100 messages are returned per page.
      operationId: list-messages
      parameters:
        - description: >-
            Channel ID to list messages for (UUID format only, do not include
            the 'messaging:' prefix)
          in: query
          name: channelId
          required: true
          schema:
            type: string
        - description: Maximum number of messages to return (capped at 100)
          in: query
          name: limit
          schema:
            type: integer
        - description: Pagination cursor returned by a previous call
          in: query
          name: nextToken
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/api.List'
                  - properties:
                      data:
                        items:
                          $ref: '#/components/schemas/messages.Message'
                        type: array
                    type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Invalid pagination parameters or channel ID
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key
      security:
        - APIKeyHeader: []
components:
  schemas:
    api.List:
      properties:
        data:
          items: {}
          nullable: true
          type: array
        nextToken:
          description: base64 encoded JSON representing a NextToken
          type: string
      type: object
    messages.Message:
      properties:
        channelId:
          description: >-
            ChannelID is the channel the message belongs to (bare UUID, without
            the GetStream 'messaging:' prefix).
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        createdAt:
          type: string
        creatorId:
          type: string
        data:
          type: string
        id:
          type: string
        identityId:
          type: string
        isAttachmentIncluded:
          description: >-
            IsAttachmentIncluded indicates whether the message has one or more
            attachments.
          example: false
          type: boolean
        object:
          description: Object is the resource type discriminator, always "message".
          example: message
          type: string
        previousAttributes:
          additionalProperties: true
          type: object
        ref:
          type: string
        senderId:
          description: SenderID is the UUID of the member who authored the message.
          example: 550e8400-e29b-41d4-a716-446655440001
          format: uuid
          type: string
        text:
          description: >-
            Text is the body of the message. Empty when the message only carries
            attachments.
          example: Thanks for the update, I'll review the contract today.
          type: string
        updatedAt:
          type: string
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````