> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# listMessages

> Retrieves the conversation's [Messages](#schema_message)



## OpenAPI

````yaml chat-openapi.json get /conversations/{conversationId}/messages
openapi: 3.0.0
info:
  title: Chat API
  description: API for the Chat Integration
  version: 0.0.0
servers:
  - url: https://chat.botpress.cloud/{webhookUrl}
    variables:
      webhookUrl:
        default: your_default_webhook_url
        description: The webhook URL
security: []
paths:
  /conversations/{conversationId}/messages:
    get:
      tags:
        - Endpoints
      summary: List Messages
      description: Retrieves the conversation's [Messages](#schema_message)
      operationId: listMessages
      parameters:
        - name: x-user-key
          in: header
          description: Authentication Key
          required: true
          schema:
            type: string
        - name: nextToken
          in: query
          description: >-
            Provide the `meta.nextToken` value provided in the last API response
            to retrieve the next page of results
          required: false
          schema:
            type: string
        - name: conversationId
          in: path
          description: Conversation id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Returns a list of [Message](#schema_message) objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Identifier of the [Message](#schema_message)
                        createdAt:
                          type: string
                          format: date-time
                          description: >-
                            Creation date of the [Message](#schema_message) in
                            ISO 8601 format
                        payload:
                          oneOf:
                            - type: object
                              properties:
                                audioUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - audio
                              required:
                                - audioUrl
                                - type
                            - type: object
                              properties:
                                title:
                                  type: string
                                  minLength: 1
                                subtitle:
                                  type: string
                                  minLength: 1
                                imageUrl:
                                  type: string
                                  minLength: 1
                                actions:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      action:
                                        type: string
                                        enum:
                                          - postback
                                          - url
                                          - say
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - action
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - card
                              required:
                                - title
                                - actions
                                - type
                            - type: object
                              properties:
                                items:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        minLength: 1
                                      subtitle:
                                        type: string
                                        minLength: 1
                                      imageUrl:
                                        type: string
                                        minLength: 1
                                      actions:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            action:
                                              type: string
                                              enum:
                                                - postback
                                                - url
                                                - say
                                            label:
                                              type: string
                                              minLength: 1
                                            value:
                                              type: string
                                              minLength: 1
                                          required:
                                            - action
                                            - label
                                            - value
                                    required:
                                      - title
                                      - actions
                                type:
                                  type: string
                                  enum:
                                    - carousel
                              required:
                                - items
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - choice
                              required:
                                - text
                                - options
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - dropdown
                              required:
                                - text
                                - options
                                - type
                            - type: object
                              properties:
                                fileUrl:
                                  type: string
                                  minLength: 1
                                title:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - file
                              required:
                                - fileUrl
                                - type
                            - type: object
                              properties:
                                imageUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - image
                              required:
                                - imageUrl
                                - type
                            - type: object
                              properties:
                                latitude:
                                  type: number
                                longitude:
                                  type: number
                                address:
                                  type: string
                                title:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - location
                              required:
                                - latitude
                                - longitude
                                - type
                            - type: object
                              properties:
                                markdown:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - markdown
                              required:
                                - markdown
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - text
                              required:
                                - text
                                - type
                            - type: object
                              properties:
                                videoUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - video
                              required:
                                - videoUrl
                                - type
                          description: Payload is the content type of the message.
                        userId:
                          type: string
                          description: ID of the [User](#schema_user)
                        conversationId:
                          type: string
                          description: ID of the [Conversation](#schema_conversation)
                      required:
                        - id
                        - createdAt
                        - payload
                        - userId
                        - conversationId
                      description: >-
                        The Message object represents a message in a
                        [Conversation](#schema_conversation) for a specific
                        [User](#schema_user).
                      additionalProperties: false
                      x-readme-ref-name: Message
                  meta:
                    type: object
                    properties:
                      nextToken:
                        type: string
                        description: >-
                          The token to use to retrieve the next page of results,
                          passed as a query string parameter (value should be
                          URL-encoded) to this API endpoint.
                    additionalProperties: false
                required:
                  - messages
                  - meta
                title: listMessagesResponse
                additionalProperties: false
        default:
          description: Returns a list of [Message](#schema_message) objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Identifier of the [Message](#schema_message)
                        createdAt:
                          type: string
                          format: date-time
                          description: >-
                            Creation date of the [Message](#schema_message) in
                            ISO 8601 format
                        payload:
                          oneOf:
                            - type: object
                              properties:
                                audioUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - audio
                              required:
                                - audioUrl
                                - type
                            - type: object
                              properties:
                                title:
                                  type: string
                                  minLength: 1
                                subtitle:
                                  type: string
                                  minLength: 1
                                imageUrl:
                                  type: string
                                  minLength: 1
                                actions:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      action:
                                        type: string
                                        enum:
                                          - postback
                                          - url
                                          - say
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - action
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - card
                              required:
                                - title
                                - actions
                                - type
                            - type: object
                              properties:
                                items:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        minLength: 1
                                      subtitle:
                                        type: string
                                        minLength: 1
                                      imageUrl:
                                        type: string
                                        minLength: 1
                                      actions:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            action:
                                              type: string
                                              enum:
                                                - postback
                                                - url
                                                - say
                                            label:
                                              type: string
                                              minLength: 1
                                            value:
                                              type: string
                                              minLength: 1
                                          required:
                                            - action
                                            - label
                                            - value
                                    required:
                                      - title
                                      - actions
                                type:
                                  type: string
                                  enum:
                                    - carousel
                              required:
                                - items
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - choice
                              required:
                                - text
                                - options
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                        minLength: 1
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - label
                                      - value
                                type:
                                  type: string
                                  enum:
                                    - dropdown
                              required:
                                - text
                                - options
                                - type
                            - type: object
                              properties:
                                fileUrl:
                                  type: string
                                  minLength: 1
                                title:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - file
                              required:
                                - fileUrl
                                - type
                            - type: object
                              properties:
                                imageUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - image
                              required:
                                - imageUrl
                                - type
                            - type: object
                              properties:
                                latitude:
                                  type: number
                                longitude:
                                  type: number
                                address:
                                  type: string
                                title:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - location
                              required:
                                - latitude
                                - longitude
                                - type
                            - type: object
                              properties:
                                markdown:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - markdown
                              required:
                                - markdown
                                - type
                            - type: object
                              properties:
                                text:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - text
                              required:
                                - text
                                - type
                            - type: object
                              properties:
                                videoUrl:
                                  type: string
                                  minLength: 1
                                type:
                                  type: string
                                  enum:
                                    - video
                              required:
                                - videoUrl
                                - type
                          description: Payload is the content type of the message.
                        userId:
                          type: string
                          description: ID of the [User](#schema_user)
                        conversationId:
                          type: string
                          description: ID of the [Conversation](#schema_conversation)
                      required:
                        - id
                        - createdAt
                        - payload
                        - userId
                        - conversationId
                      description: >-
                        The Message object represents a message in a
                        [Conversation](#schema_conversation) for a specific
                        [User](#schema_user).
                      additionalProperties: false
                      x-readme-ref-name: Message
                  meta:
                    type: object
                    properties:
                      nextToken:
                        type: string
                        description: >-
                          The token to use to retrieve the next page of results,
                          passed as a query string parameter (value should be
                          URL-encoded) to this API endpoint.
                    additionalProperties: false
                required:
                  - messages
                  - meta
                title: listMessagesResponse
                additionalProperties: false

````