AgentMail inboxes > messages API

The inboxes > messages API from AgentMail — 11 operation(s) for inboxes > messages.

Operations 13

GET /v0/inboxes/{inbox_id}/messages List Messages #
GET /v0/inboxes/{inbox_id}/messages/{message_id} Get Message #
PATCH /v0/inboxes/{inbox_id}/messages/{message_id} Update Message #
DELETE /v0/inboxes/{inbox_id}/messages/{message_id} Delete Message #
POST /v0/inboxes/{inbox_id}/messages/batch-get Batch Get Messages #
POST /v0/inboxes/{inbox_id}/messages/batch-update Batch Update Messages #
GET /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id} Get Attachment #
GET /v0/inboxes/{inbox_id}/messages/{message_id}/raw Get Raw Message #
POST /v0/inboxes/{inbox_id}/messages/send Send Message #
POST /v0/inboxes/{inbox_id}/messages/{message_id}/reply Reply To Message #
POST /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all Reply All Message #
POST /v0/inboxes/{inbox_id}/messages/{message_id}/forward Forward Message #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentmail-inboxes-messages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agentmail-inboxes-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference inboxes > messages API
  version: 1.0.0
servers:
- url: https://api.agentmail.to
  description: prod
- url: https://x402.api.agentmail.to
  description: prod-x402
- url: https://mpp.api.agentmail.to
  description: prod-mpp
- url: https://api.agentmail.eu
  description: eu-prod
tags:
- name: inboxes > messages
paths:
  /v0/inboxes/{inbox_id}/messages:
    get:
      operationId: list
      summary: List Messages
      description: 'Lists messages in the inbox, most recent first. Pass `from`, `to`, or

        `subject` to filter by substring. Filtered requests are served by

        search, which caps `limit` at 100. For relevance-ranked full-text

        search across sender, recipients, subject, and message body, use

        `Search Messages`.


        **CLI:**

        ```bash

        agentmail inboxes:messages list --inbox-id <inbox_id>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: limit
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Limit'
      - name: page_token
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__PageToken'
      - name: labels
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Labels'
      - name: before
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Before'
      - name: after
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__After'
      - name: ascending
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Ascending'
      - name: include_spam
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__IncludeSpam'
      - name: include_blocked
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__IncludeBlocked'
      - name: include_unauthenticated
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__IncludeUnauthenticated'
      - name: include_trash
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__IncludeTrash'
      - name: from
        in: query
        description: Filter to messages whose sender contains this value (substring match). Repeatable; all values must match.
        required: false
        schema:
          type: array
          items:
            type: string
      - name: to
        in: query
        description: Filter to messages whose recipients (to, cc, or bcc) contain this value (substring match). Repeatable; all values must match.
        required: false
        schema:
          type: array
          items:
            type: string
      - name: subject
        in: query
        description: Filter to messages whose subject contains this value (substring match). Repeatable; all values must match.
        required: false
        schema:
          type: array
          items:
            type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_ListMessagesResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
  /v0/inboxes/{inbox_id}/messages/search:
    get:
      operationId: search
      summary: Search Messages
      description: 'Full-text search across messages in the inbox, ranked by relevance. The

        query is matched against the sender, recipients, and subject (substring)

        and the message body (tokenized full text). Spam, trash, blocked, and

        unauthenticated messages are always excluded. `limit` cannot exceed 100.'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: q
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/type__Query'
      - name: limit
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Limit'
      - name: page_token
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__PageToken'
      - name: before
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__Before'
      - name: after
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type__After'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_SearchMessagesResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
  /v0/inboxes/{inbox_id}/messages/{message_id}:
    get:
      operationId: get
      summary: Get Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_Message'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
    patch:
      operationId: update
      summary: Update Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages update --inbox-id <inbox_id> --message-id <message_id> --add-label read --remove-label unread

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_UpdateMessageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_UpdateMessageRequest'
    delete:
      operationId: delete
      summary: Delete Message
      description: 'Permanently deletes a message.


        **CLI:**

        ```bash

        agentmail inboxes:messages delete --inbox-id <inbox_id> --message-id <message_id>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
  /v0/inboxes/{inbox_id}/messages/batch-get:
    post:
      operationId: batch-get
      summary: Batch Get Messages
      description: 'Fetch metadata for up to 500 messages in one request. Missing or

        restricted IDs are silently omitted; compare `count` against `limit`

        to detect misses.


        **CLI:**

        ```bash

        agentmail inboxes:messages batch-get --inbox-id <inbox_id> --message-id <id1> --message-id <id2>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_BatchGetMessagesResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_BatchGetMessagesRequest'
  /v0/inboxes/{inbox_id}/messages/batch-update:
    post:
      operationId: batch-update
      summary: Batch Update Messages
      description: 'Apply one label change to up to 50 messages in a single request. The

        same add_labels and remove_labels apply to every message id, and at

        least one of them must be provided. The update is atomic: either all

        resolved messages are updated or none are. Missing or restricted ids

        are silently excluded; compare `count` against `limit` to detect

        exclusions.


        **CLI:**

        ```bash

        agentmail inboxes:messages batch-update --inbox-id <inbox_id> --message-id <id1> --message-id <id2> --add-label read --remove-label unread

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_BatchUpdateMessagesResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_BatchUpdateMessagesRequest'
  /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}:
    get:
      operationId: get-attachment
      summary: Get Attachment
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages get-attachment --inbox-id <inbox_id> --message-id <message_id> --attachment-id <attachment_id>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: attachment_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_attachments_AttachmentId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_attachments_AttachmentResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
  /v0/inboxes/{inbox_id}/messages/{message_id}/raw:
    get:
      operationId: get-raw
      summary: Get Raw Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages get-raw --inbox-id <inbox_id> --message-id <message_id>

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_RawMessageResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
  /v0/inboxes/{inbox_id}/messages/send:
    post:
      operationId: send
      summary: Send Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages send --inbox-id <inbox_id> --to recipient@example.com --subject "Hello" --text "Body"

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_SendMessageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '403':
          description: Error response with status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '409':
          description: Error response with status 409
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_SendMessageRequest'
  /v0/inboxes/{inbox_id}/messages/{message_id}/reply:
    post:
      operationId: reply
      summary: Reply To Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_SendMessageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '403':
          description: Error response with status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '409':
          description: Error response with status 409
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_ReplyToMessageRequest'
  /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all:
    post:
      operationId: reply-all
      summary: Reply All Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages reply-all --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_SendMessageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '403':
          description: Error response with status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '409':
          description: Error response with status 409
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_ReplyAllMessageRequest'
  /v0/inboxes/{inbox_id}/messages/{message_id}/forward:
    post:
      operationId: forward
      summary: Forward Message
      description: '**CLI:**

        ```bash

        agentmail inboxes:messages forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com

        ```'
      tags:
      - inboxes > messages
      parameters:
      - name: inbox_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_inboxes_InboxId'
      - name: message_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_messages_MessageId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_SendMessageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
        '403':
          description: Error response with status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
        '409':
          description: Error response with status 409
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_messages_SendMessageRequest'
components:
  schemas:
    type__Labels:
      type: array
      items:
        type: string
      description: Labels to filter by.
      title: Labels
    type_messages_MessageSize:
      type: integer
      description: Size of message in bytes.
      title: MessageSize
    type_messages_UpdateMessageRequest:
      type: object
      properties:
        add_labels:
          $ref: '#/components/schemas/type_messages_UpdateMessageLabels'
          description: Label or labels to add to message.
        remove_labels:
          $ref: '#/components/schemas/type_messages_UpdateMessageLabels'
          description: Label or labels to remove from message.
      title: UpdateMessageRequest
    type_messages_Addresses:
      oneOf:
      - type: string
      - type: array
        items:
          type: string
      title: Addresses
    type__Before:
      type: string
      format: date-time
      description: Timestamp before which to filter by.
      title: Before
    type_messages_BatchGetMessagesResponse:
      type: object
      properties:
        limit:
          $ref: '#/components/schemas/type__Limit'
        count:
          $ref: '#/components/schemas/type__Count'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/type_messages_Message'
          description: 'Found messages. Order matches `message_ids` in the request. Body

            fields (`text`, `html`, `extracted_text`, `extracted_html`) are

            never populated; use the single-message endpoint to retrieve bodies.'
      required:
      - limit
      - count
      - messages
      title: BatchGetMessagesResponse
    type_messages_ReplyToMessageRequest:
      type: object
      properties:
        labels:
          $ref: '#/components/schemas/type_messages_MessageLabels'
        reply_to:
          $ref: '#/components/schemas/type_messages_SendMessageReplyTo'
        to:
          $ref: '#/components/schemas/type_messages_SendMessageTo'
        cc:
          $ref: '#/components/schemas/type_messages_SendMessageCc'
        bcc:
          $ref: '#/components/schemas/type_messages_SendMessageBcc'
        reply_all:
          $ref: '#/components/schemas/type_messages_ReplyAll'
        text:
          $ref: '#/components/schemas/type_messages_MessageText'
        html:
          $ref: '#/components/schemas/type_messages_MessageHtml'
        attachments:
          $ref: '#/components/schemas/type_messages_SendMessageAttachments'
        headers:
          $ref: '#/components/schemas/type_messages_SendMessageHeaders'
      title: ReplyToMessageRequest
    type_messages_SendMessageBcc:
      $ref: '#/components/schemas/type_messages_Addresses'
      description: BCC recipient address or addresses.
      title: SendMessageBcc
    type_attachments_AttachmentId:
      type: string
      description: ID of attachment.
      title: AttachmentId
    type_attachments_AttachmentSize:
      type: integer
      description: Size of attachment in bytes.
      title: AttachmentSize
    type_messages_ReplyAll:
      type: boolean
      description: Reply to all recipients of the original message.
      title: ReplyAll
    type_attachments_Attachment:
      type: object
      properties:
        attachment_id:
          $ref: '#/components/schemas/type_attachments_AttachmentId'
        filename:
          $ref: '#/components/schemas/type_attachments_AttachmentFilename'
        size:
          $ref: '#/components/schemas/type_attachments_AttachmentSize'
        content_type:
          $ref: '#/components/schemas/type_attachments_AttachmentContentType'
        content_disposition:
          $ref: '#/components/schemas/type_attachments_AttachmentContentDisposition'
        content_id:
          $ref: '#/components/schemas/type_attachments_AttachmentContentId'
      required:
      - attachment_id
      - size
      title: Attachment
    type_messages_MessageHeaders:
      type: object
      additionalProperties:
        type: string
      description: Headers in message.
      title: MessageHeaders
    type_messages_MessageLabels:
      type: array
      items:
        type: string
      description: Labels of message.
      title: MessageLabels
    type_messages_MessageCreatedAt:
      type: string
      format: date-time
      description: Time at which message was created.
      title: MessageCreatedAt
    type_messages_SendMessageAttachments:
      type: array
      items:
        $ref: '#/components/schemas/type_attachments_SendAttachment'
      description: Attachments to include in message.
      title: SendMessageAttachments
    type_messages_MessageItem:
      type: object
      properties:
        inbox_id:
          $ref: '#/components/schemas/type_inboxes_InboxId'
        thread_id:
          $ref: '#/components/schemas/type_threads_ThreadId'
        message_id:
          $ref: '#/components/schemas/type_messages_MessageId'
        labels:
          $ref: '#/components/schemas/type_messages_MessageLabels'
        timestamp:
          $ref: '#/components/schemas/type_messages_MessageTimestamp'
        from:
          $ref: '#/components/schemas/type_messages_MessageFrom'
        to:
          $ref: '#/components/schemas/type_messages_MessageTo'
        cc:
          $ref: '#/components/schemas/type_messages_MessageCc'
        bcc:
          $ref: '#/components/schemas/type_messages_MessageBcc'
        subject:
          $ref: '#/components/schemas/type_messages_MessageSubject'
        preview:
          $ref: '#/components/schemas/type_messages_MessagePreview'
        attachments:
          $ref: '#/components/schemas/type_messages_MessageAttachments'
        in_reply_to:
          $ref: '#/components/schemas/type_messages_MessageInReplyTo'
        references:
          $ref: '#/components/schemas/type_messages_MessageReferences'
        headers:
          $ref: '#/components/schemas/type_messages_MessageHeaders'
        size:
          $ref: '#/components/schemas/type_messages_MessageSize'
        updated_at:
          $ref: '#/components/schemas/type_messages_MessageUpdatedAt'
        created_at:
          $ref: '#/components/schemas/type_messages_MessageCreatedAt'
      required:
      - inbox_id
      - thread_id
      - message_id
      - labels
      - timestamp
      - from
      - to
      - size
      - updated_at
      - created_at
      title: MessageItem
    type_messages_SendMessageCc:
      $ref: '#/components/schemas/type_messages_Addresses'
      description: CC recipient address or addresses.
      title: SendMessageCc
    type__IncludeUnauthenticated:
      type: boolean
      description: Include unauthenticated in results.
      title: IncludeUnauthenticated
    type_messages_MessageUpdatedAt:
      type: string
      format: date-time
      description: Time at which message was last updated.
      title: MessageUpdatedAt
    type_messages_ReplyAllMessageRequest:
      type: object
      properties:
        labels:
          $ref: '#/components/schemas/type_messages_MessageLabels'
        reply_to:
          $ref: '#/components/schemas/type_messages_SendMessageReplyTo'
        text:
          $ref: '#/components/schemas/type_messages_MessageText'
        html:
          $ref: '#/components/schemas/type_messages_MessageHtml'
        attachments:
          $ref: '#/components/schemas/type_messages_SendMessageAttachments'
        headers:
          $ref: '#/components/schemas/type_messages_SendMessageHeaders'
      title: ReplyAllMessageRequest
    type__ErrorFix:
      type: string
      description: The concrete next action that resolves the error.
      title: ErrorFix
    type__Count:
      type: integer
      description: Number of items returned.
      title: Count
    type_messages_SendMessageTo:
      $ref: '#/components/schemas/type_messages_Addresses'
      description: Recipient address or addresses.
      title: SendMessageTo
    type__ErrorMessage:
      type: string
      description: Error message.
      title: ErrorMessage
    type__ValidationErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        code:
          $ref: '#/components/schemas/type__ErrorCode'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
        errors:
          description: Validation errors. Each entry has a path and a message identifying the invalid field.
        fix:
          $ref: '#/components/schemas/type__ErrorFix'
        docs:
          $ref: '#/components/schemas/type__ErrorDocs'
      required:
      - name
      - errors
      title: ValidationErrorResponse
    type__IncludeTrash:
      type: boolean
      description: Include trash in results.
      title: IncludeTrash
    type_messages_MessageAttachments:
      type: array
      items:
        $ref: '#/components/schemas/type_attachments_Attachment'
      description: Attachments in message.
      title: MessageAttachments
    type__IncludeSpam:
      type: boolean
      description: Include spam in results.
      title: IncludeSpam
    type_attachments_AttachmentContentId:
      type: string
      description: Content ID of attachment.
      title: AttachmentContentId
    type__ErrorName:
      type: string
      description: Name of error.
      title: ErrorName
    type_messages_MessageCc:
     

# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/agentmail/refs/heads/main/openapi/agentmail-inboxes-messages-api-openapi.yml