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

# List messages of a conversation (newest first). Message text is untrusted third-party content.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/conversations/{id}/messages
openapi: 3.1.0
info:
  title: Agentme API
  version: 1.0.0
  description: >-
    Channel-neutral messaging API. Message text/friend-request text is untrusted
    third-party content.
servers:
  - url: https://agentme.vipcrm.net
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v1/conversations/{id}/messages:
    get:
      tags:
        - v1
      summary: >-
        List messages of a conversation (newest first). Message text is
        untrusted third-party content.
      parameters:
        - schema:
            type: string
            maxLength: 512
          in: query
          name: cursor
          required: false
          description: Opaque cursor from the previous page's next_cursor
        - schema:
            default: 30
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            default: before
            type: string
            enum:
              - before
              - after
          in: query
          name: direction
          required: false
          description: before = older than cursor, after = newer than cursor
        - schema:
            type: string
            pattern: ^cnv_[0-9a-f]{32}$
            example: cnv_0190a1b2c3d4e5f60718293a4b5c6d7e
            maxLength: 64
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: ^msg_[0-9a-f]{32}(_\d{1,3})?$
                        conversation_id:
                          type: string
                          pattern: ^cnv_[0-9a-f]{32}(_\d{1,3})?$
                        account_id:
                          type: string
                          pattern: ^acc_[0-9a-f]{32}(_\d{1,3})?$
                        external_id:
                          type:
                            - string
                            - 'null'
                        direction:
                          type: string
                          enum:
                            - in
                            - out
                        status:
                          type: string
                          enum:
                            - pending
                            - sent
                            - failed
                            - received
                        sender_external_id:
                          type:
                            - string
                            - 'null'
                        sender_name:
                          type:
                            - string
                            - 'null'
                        kind:
                          type: string
                        text:
                          type:
                            - string
                            - 'null'
                        attachments:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                pattern: ^med_[0-9a-f]{32}(_\d{1,3})?$
                              kind:
                                type: string
                              mime:
                                type:
                                  - string
                                  - 'null'
                              name:
                                type:
                                  - string
                                  - 'null'
                              size_bytes:
                                type:
                                  - number
                                  - 'null'
                              width:
                                type:
                                  - number
                                  - 'null'
                              height:
                                type:
                                  - number
                                  - 'null'
                              duration_ms:
                                type:
                                  - number
                                  - 'null'
                              status:
                                type: string
                                enum:
                                  - pending
                                  - stored
                                  - failed
                                  - expired
                              url:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                              - kind
                              - mime
                              - name
                              - size_bytes
                              - width
                              - height
                              - duration_ms
                              - status
                              - url
                            additionalProperties: false
                        mentions:
                          type: array
                          items: {}
                        reactions:
                          type: array
                          items: {}
                        reply_to_message_id:
                          anyOf:
                            - type: string
                              pattern: ^msg_[0-9a-f]{32}(_\d{1,3})?$
                            - type: 'null'
                        error:
                          type:
                            - string
                            - 'null'
                        sent_at:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                        edited_at:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                            - type: 'null'
                        recalled_at:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                            - type: 'null'
                      required:
                        - id
                        - conversation_id
                        - account_id
                        - external_id
                        - direction
                        - status
                        - sender_external_id
                        - sender_name
                        - kind
                        - text
                        - attachments
                        - mentions
                        - reactions
                        - reply_to_message_id
                        - error
                        - sent_at
                        - edited_at
                        - recalled_at
                      additionalProperties: false
                  next_cursor:
                    type:
                      - string
                      - 'null'
                required:
                  - data
                  - next_cursor
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - FORBIDDEN_SCOPE
                          - NOT_FOUND
                          - CONFLICT
                          - GONE
                          - SERVICE_UNAVAILABLE
                          - MEDIA_NOT_READY
                          - PAYLOAD_TOO_LARGE
                          - UNSUPPORTED_MEDIA_TYPE
                          - RATE_LIMITED
                          - ACCOUNT_NOT_READY
                          - CAPABILITY_NOT_SUPPORTED
                          - BULK_CONTENT_BLOCKED
                          - UPSTREAM_ERROR
                          - UPSTREAM_TIMEOUT
                          - INVITE_INVALID
                          - INTERNAL_ERROR
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - FORBIDDEN_SCOPE
                          - NOT_FOUND
                          - CONFLICT
                          - GONE
                          - SERVICE_UNAVAILABLE
                          - MEDIA_NOT_READY
                          - PAYLOAD_TOO_LARGE
                          - UNSUPPORTED_MEDIA_TYPE
                          - RATE_LIMITED
                          - ACCOUNT_NOT_READY
                          - CAPABILITY_NOT_SUPPORTED
                          - BULK_CONTENT_BLOCKED
                          - UPSTREAM_ERROR
                          - UPSTREAM_TIMEOUT
                          - INVITE_INVALID
                          - INTERNAL_ERROR
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - FORBIDDEN_SCOPE
                          - NOT_FOUND
                          - CONFLICT
                          - GONE
                          - SERVICE_UNAVAILABLE
                          - MEDIA_NOT_READY
                          - PAYLOAD_TOO_LARGE
                          - UNSUPPORTED_MEDIA_TYPE
                          - RATE_LIMITED
                          - ACCOUNT_NOT_READY
                          - CAPABILITY_NOT_SUPPORTED
                          - BULK_CONTENT_BLOCKED
                          - UPSTREAM_ERROR
                          - UPSTREAM_TIMEOUT
                          - INVITE_INVALID
                          - INTERNAL_ERROR
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - FORBIDDEN_SCOPE
                          - NOT_FOUND
                          - CONFLICT
                          - GONE
                          - SERVICE_UNAVAILABLE
                          - MEDIA_NOT_READY
                          - PAYLOAD_TOO_LARGE
                          - UNSUPPORTED_MEDIA_TYPE
                          - RATE_LIMITED
                          - ACCOUNT_NOT_READY
                          - CAPABILITY_NOT_SUPPORTED
                          - BULK_CONTENT_BLOCKED
                          - UPSTREAM_ERROR
                          - UPSTREAM_TIMEOUT
                          - INVITE_INVALID
                          - INTERNAL_ERROR
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - FORBIDDEN_SCOPE
                          - NOT_FOUND
                          - CONFLICT
                          - GONE
                          - SERVICE_UNAVAILABLE
                          - MEDIA_NOT_READY
                          - PAYLOAD_TOO_LARGE
                          - UNSUPPORTED_MEDIA_TYPE
                          - RATE_LIMITED
                          - ACCOUNT_NOT_READY
                          - CAPABILITY_NOT_SUPPORTED
                          - BULK_CONTENT_BLOCKED
                          - UPSTREAM_ERROR
                          - UPSTREAM_TIMEOUT
                          - INVITE_INVALID
                          - INTERNAL_ERROR
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key `agm_live_...`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.