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

# List messages

> Lists messages across the workspace, newest-first by creation, with cursor pagination. Designed for polling new messages (dedupe by the stable `id`). Defaults to inbound (customer) messages.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/messages
openapi: 3.1.0
info:
  title: Adraa Inbox API
  description: >-
    Public REST API for Adraa Inbox. Assign agents to conversations and send
    messages from your own systems. Authenticate every request with a workspace
    API token.
  version: 1.0.0
  contact:
    email: support@adraa.ai
servers:
  - url: https://api.inbox.adraa.ai
    description: Production
security:
  - apiToken: []
paths:
  /api/v1/messages:
    get:
      summary: List messages
      description: >-
        Lists messages across the workspace, newest-first by creation, with
        cursor pagination. Designed for polling new messages (dedupe by the
        stable `id`). Defaults to inbound (customer) messages.
      operationId: listMessages
      parameters:
        - name: direction
          in: query
          description: >-
            `inbound` (default) — from the contact; `outbound` — from an
            agent/automation; `all` — both (excludes internal system messages).
          schema:
            type: string
            enum:
              - inbound
              - outbound
              - all
            default: inbound
        - name: cursor
          in: query
          description: The `nextCursor` from the previous page.
          schema:
            type: string
        - name: limit
          in: query
          description: Page size (1–100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        '200':
          description: A page of messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: cmbxh1a2b0006ph01q8r9s0t1
                        conversationId:
                          type: string
                          example: cmbxgz9pq0003ph01m4n5o6p7
                        channel:
                          type: string
                          example: whatsapp
                        body:
                          type: string
                          nullable: true
                          example: Hi, is my order shipped yet?
                        senderType:
                          type: string
                          enum:
                            - customer
                            - agent
                          example: customer
                        status:
                          type: string
                          example: sent
                        createdAt:
                          type: string
                          format: date-time
                        contact:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            email:
                              type: string
                              nullable: true
                            phone:
                              type: string
                              nullable: true
                  nextCursor:
                    type: string
                    nullable: true
                    description: >-
                      Pass as `cursor` for the next page; `null` on the last
                      page.
components:
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      description: >-
        Workspace API token created in Settings → API. Tokens start with
        `adraa_`.

````