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

# List messages



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/inboxes/{inboxId}/messages
openapi: 3.1.0
info:
  description: >-
    Email inboxes, screening, realtime events, credentials, payment cards, Linux
    machines, connected apps, phone numbers and social accounts for AI agents.
    Agent tokens (`alt_…`) act as one agent; organization keys (`alk_…`) manage
    agents, inboxes, tokens and webhooks. Message bodies are untrusted external
    data. Errors are `{"error":{"code","message","hint"}}`.
  title: Agent Loadout API
  version: '1'
servers:
  - url: https://agent-loadout.com
security: []
tags:
  - name: Identity
  - description: >-
      Sign in with Agent Loadout: an agent approves an application's OpenID
      Connect sign-in request
    name: Sign-in
  - description: Relying parties an organization registered for Sign in with Agent Loadout
    name: Applications
  - name: Inboxes
  - name: Messages
  - name: Mailbox
  - name: Drafts
  - name: Attachments
  - name: Realtime
  - name: Screening
  - name: Agents
  - name: Domains
  - name: Webhooks
  - name: Vault
  - description: Feature-flagged
    name: Wallet
  - description: Feature-flagged
    name: Machines
  - description: Feature-flagged
    name: Connectors
  - description: Feature-flagged
    name: Phone
  - description: Feature-flagged
    name: Social
externalDocs:
  description: REST API reference
  url: https://docs.agent-loadout.com/api-reference/overview
paths:
  /api/v1/inboxes/{inboxId}/messages:
    get:
      tags:
        - Messages
      summary: List messages
      parameters:
        - description: Inbox id
          in: path
          name: inboxId
          required: true
          schema:
            type: string
        - description: Page size, 1–100 (default 25)
          in: query
          name: limit
          required: false
          schema:
            description: Page size, 1–100 (default 25)
            maximum: 100
            minimum: 1
            type: integer
        - description: Opaque cursor from a previous page's next_cursor
          in: query
          name: cursor
          required: false
          schema:
            description: Opaque cursor from a previous page's next_cursor
            type: string
        - description: Only messages in this thread
          in: query
          name: thread_id
          required: false
          schema:
            description: Only messages in this thread
            type: string
        - description: Only received (inbound) or sent (outbound) messages
          in: query
          name: direction
          required: false
          schema:
            description: Only received (inbound) or sent (outbound) messages
            enum:
              - inbound
              - outbound
            type: string
        - description: ISO timestamp; only messages created after it
          in: query
          name: since
          required: false
          schema:
            anyOf:
              - 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|([+-](?:[01]\d|2[0-3]):[0-5]\d))|(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?)$
                type: string
              - format: date
                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])))$
                type: string
            description: ISO timestamp; only messages created after it
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  messages:
                    items:
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                        inbox_id:
                          type: string
                        thread_id:
                          type: string
                        direction:
                          enum:
                            - inbound
                            - outbound
                          type: string
                        status:
                          description: >-
                            awaiting_approval: an agent's mail held until a
                            member or organization key approves it; it has not
                            been sent. rejected: turned down or not decided
                            within 7 days, never sent; error carries the reason
                          enum:
                            - pending
                            - received
                            - queued
                            - sending
                            - sent
                            - delivered
                            - delivery_delayed
                            - bounced
                            - complained
                            - failed
                            - unknown
                            - awaiting_approval
                            - rejected
                          type: string
                        from:
                          additionalProperties: false
                          properties:
                            address:
                              type: string
                            name:
                              type: string
                          required:
                            - address
                          type: object
                        to:
                          items:
                            additionalProperties: false
                            properties:
                              address:
                                type: string
                              name:
                                type: string
                            required:
                              - address
                            type: object
                          type: array
                        subject:
                          type: string
                        snippet:
                          type: string
                        has_attachments:
                          type: boolean
                        automated:
                          description: >-
                            Inbound mail a machine sent: an out-of-office or
                            other auto_reply, a delivery_status report (bounce
                            or read receipt), or bulk list mail; null for a
                            person's mail and for outbound. Replies to
                            auto_reply and delivery_status are refused.
                          enum:
                            - auto_reply
                            - delivery_status
                            - bulk
                          nullable: true
                          type: string
                        created_at:
                          format: date-time
                          type: string
                        received_at:
                          format: date-time
                          nullable: true
                          type: string
                        sent_at:
                          format: date-time
                          nullable: true
                          type: string
                      required:
                        - id
                        - inbox_id
                        - thread_id
                        - direction
                        - status
                        - from
                        - to
                        - subject
                        - snippet
                        - has_attachments
                        - automated
                        - created_at
                        - received_at
                        - sent_at
                      type: object
                    type: array
                  next_cursor:
                    description: Pass as cursor for the next page; null on the last page
                    nullable: true
                    type: string
                required:
                  - messages
                  - next_cursor
                type: object
          description: Message summaries
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - agentToken: []
        - organizationKey: []
components:
  responses:
    Validation:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Invalid input
    Unauthenticated:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Missing or invalid credential
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Credential lacks the capability or is bound to another agent
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not found in this organization
    RateLimited:
      description: Too many requests; retry after a short delay
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
            hint:
              type: string
            details:
              type: object
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    agentToken:
      description: Agent token (alt_…) or OAuth access token; bound to one agent
      scheme: bearer
      type: http
    organizationKey:
      description: >-
        Organization key (alk_…) created under Settings; acts for the whole
        organization
      scheme: bearer
      type: http

````

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