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

# List messages

> Returns sent and received messages, newest first.



## OpenAPI

````yaml /openapi.yaml get /v1/messages
openapi: 3.1.0
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
security:
  - organizationApiKey: []
  - oauthAccessToken: []
tags:
  - name: Auth
  - name: Management
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
  - name: Messaging
paths:
  /v1/messages:
    get:
      tags:
        - Messaging
      summary: List messages
      description: Returns sent and received messages, newest first.
      operationId: messages_list
      parameters:
        - schema:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/StringFilter'
              conversationId:
                $ref: '#/components/schemas/StringFilter'
              conversation:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/StringFilter'
                  customerId:
                    $ref: '#/components/schemas/StringFilter'
                  createdAt:
                    $ref: '#/components/schemas/DateTimeFilter'
                  lastMessageAt:
                    $ref: '#/components/schemas/DateTimeFilter'
                  lastInboundMessageAt:
                    $ref: '#/components/schemas/DateTimeFilter'
                  lastOutboundMessageAt:
                    $ref: '#/components/schemas/DateTimeFilter'
                  assignedUserId:
                    $ref: '#/components/schemas/StringFilter'
                  hasActiveIssue:
                    anyOf:
                      - type: boolean
                        description: Boolean
                      - type: string
                        description: Boolean string
                additionalProperties: false
              organizationId:
                $ref: '#/components/schemas/StringFilter'
              type:
                type: string
                enum:
                  - INBOUND
                  - OUTBOUND
              createdAt:
                $ref: '#/components/schemas/DateTimeFilter'
              content:
                $ref: '#/components/schemas/StringFilter'
              channel:
                type: string
                enum:
                  - EMAIL
                  - SMS
                  - WHATSAPP
              status:
                type: string
                enum:
                  - QUEUED
                  - SENT
                  - DELIVERED
                  - READ
                  - FAILED
                  - UNKNOWN
                  - RECEIVED
                  - DELAYED
              provider:
                type: string
                enum:
                  - TWILIO
                  - SENDGRID
                  - WHATSAPP_API
              source:
                type: string
                enum:
                  - AUTOMATED
                  - ASSISTANT
                  - USER
                  - CUSTOMER
              authorId:
                $ref: '#/components/schemas/StringFilter'
              from:
                $ref: '#/components/schemas/StringFilter'
              to:
                $ref: '#/components/schemas/StringFilter'
            additionalProperties: false
            description: Fields encoded with `qs` bracket notation.
          required: false
          description: Fields encoded with `qs` bracket notation.
          style: deepObject
          explode: true
          name: filter
          in: query
        - schema:
            type: number
            minimum: 0
            default: 0
            description: Pagination offset.
            example: 0
          required: false
          description: Pagination offset.
          name: skip
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 100
            default: 20
            description: Pagination limit.
            example: 20
          required: false
          description: Pagination limit.
          name: take
          in: query
      responses:
        '200':
          description: Messages list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMessagesResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    StringFilter:
      type: object
      properties:
        equals:
          type: string
        in:
          type: array
          items:
            type: string
        notIn:
          type: array
          items:
            type: string
        lt:
          type: string
        lte:
          type: string
        gt:
          type: string
        gte:
          type: string
        contains:
          type: string
        startsWith:
          type: string
        endsWith:
          type: string
        search:
          type: string
        not:
          $ref: '#/components/schemas/StringFilter'
      additionalProperties: false
    DateTimeFilter:
      type: object
      properties:
        equals:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
        lt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
        lte:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
        gt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
        gte:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
        not:
          $ref: '#/components/schemas/DateTimeFilter'
      additionalProperties: false
    GetMessagesResponse:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
          createdAt:
            type: string
            format: date-time
          updatedAt:
            type: string
            format: date-time
          content:
            type: string
          direction:
            type: string
            enum:
              - INBOUND
              - OUTBOUND
          status:
            type: string
            enum:
              - QUEUED
              - SENT
              - DELIVERED
              - READ
              - FAILED
              - UNKNOWN
              - RECEIVED
              - DELAYED
          failureReason:
            type:
              - string
              - 'null'
            enum:
              - MESSAGE_EXPIRED
              - AUTHENTICATION_FAILED
              - ACCESS_DENIED
              - INVALID_MESSAGE_PARAMETER
              - SERVICE_UNAVAILABLE
              - RATE_LIMIT_HIT
              - ACCOUNT_RESTRICTED
              - COUNTRY_RESTRICTED
              - SENDER_RECIPIENT_SAME
              - BUSINESS_PAYMENT_ISSUE
              - MEDIA_ERROR
              - UNSUPPORTED_MESSAGE_TYPE
              - ACCOUNT_MAINTENANCE
              - TEMPLATE_NOT_AVAILABLE
              - TEMPLATE_PARAMETER_MISMATCH
              - TEMPLATE_PAUSED
              - TEMPLATE_DISABLED
              - TEMPLATE_CLASSIFICATION_RESTRICTED
              - FLOW_BLOCKED
              - NUMBER_PART_OF_EXPERIMENT
              - MESSAGE_UNDELIVERABLE
              - HEALTHY_ECOSYSTEM_POLICY
              - SPAM_RATE_LIMIT_HIT
              - USER_OPTED_OUT_MARKETING_MESSAGES
              - OUTSIDE_CONVERSATION_WINDOW
              - BUSINESS_ACCOUNT_LOCKED
              - UNKNOWN_ERROR
              - WHATSAPP_PHONE_NUMBER_NOT_CONNECTED
              - WHATSAPP_ACCOUNT_NOT_APPROVED
              - WHATSAPP_DISPLAY_NAME_NOT_APPROVED
              - null
          channel:
            type: string
            enum:
              - EMAIL
              - SMS
              - WHATSAPP
          sentAt:
            type:
              - string
              - 'null'
            format: date-time
          from:
            type: string
          to:
            type: string
          source:
            type: string
            enum:
              - AUTOMATED
              - ASSISTANT
              - USER
              - CUSTOMER
          authorId:
            type:
              - string
              - 'null'
          provider:
            type: string
            enum:
              - TWILIO
              - SENDGRID
              - WHATSAPP_API
          providerMessageId:
            type:
              - string
              - 'null'
          incomingMessageId:
            type:
              - string
              - 'null'
          outboundMessageId:
            type:
              - string
              - 'null'
          organizationId:
            type:
              - string
              - 'null'
          conversationId:
            type:
              - string
              - 'null'
        required:
          - id
          - createdAt
          - updatedAt
          - content
          - direction
          - status
          - failureReason
          - channel
          - sentAt
          - from
          - to
          - source
          - authorId
          - provider
          - providerMessageId
          - incomingMessageId
          - outboundMessageId
          - organizationId
          - conversationId
      description: Messages, newest first.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'
    oauthAccessToken:
      type: http
      scheme: bearer
      bearerFormat: OAuth 2.1
      description: 'OAuth access token using `Authorization: Bearer qoa_at_...`.'

````

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