> ## Documentation Index
> Fetch the complete documentation index at: https://openmail-docs-cc-replies.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List messages

> List all messages in an inbox, across every thread. Supports pagination for high-volume inboxes.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/inboxes/{id}/messages
openapi: 3.0.3
info:
  title: OpenMail API
  description: >-
    Email infrastructure API for AI agents. Create inboxes, send and receive
    email, and get real-time notifications via webhooks.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.openmail.sh
security:
  - bearerAuth: []
paths:
  /v1/inboxes/{id}/messages:
    get:
      summary: List messages
      description: >-
        List all messages in an inbox, across every thread. Supports pagination
        for high-volume inboxes.
      operationId: listMessages
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            maximum: 100
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
        - name: direction
          in: query
          schema:
            type: string
            enum:
              - inbound
              - outbound
      responses:
        '200':
          description: List of messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
                  total:
                    type: integer
components:
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
        threadId:
          type: string
        direction:
          type: string
          enum:
            - inbound
            - outbound
        fromAddr:
          type: string
        toAddr:
          type: string
        subject:
          type: string
        bodyText:
          type: string
        bodyHtml:
          type: string
        attachments:
          type: array
          items:
            type: object
            properties:
              filename:
                type: string
              contentType:
                type: string
              sizeBytes:
                type: integer
              url:
                type: string
                description: Signed URL for download
        status:
          type: string
          enum:
            - pending
            - sent
            - received
            - failed
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````