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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

        ```'
      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 --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 --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 --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 --message-id --message-id

        ```'
      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 --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: 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 --message-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 --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 --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 --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 --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 --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_messages_Message:
      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'
        reply_to:
          type: array
          items:
            type: string
          description: Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
        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'
        text:
          $ref: '#/components/schemas/type_messages_MessageText'
        html:
          $ref: '#/components/schemas/type_messages_MessageHtml'
        extracted_text:
          type: string
          description: Extracted new text content.
        extracted_html:
          type: string
          description: Extracted new HTML content.
        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: Message
    type_attachments_AttachmentResponse:
      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'
        download_url:
          type: string
          description: URL to download the attachment.
        expires_at:
          type: string
          format: date-time
          description: Time at which the download URL expires.
      required:
      - attachment_id
      - size
      - download_url
      - expires_at
      title: AttachmentResponse
    type_messages_ReplyAll:
      type: boolean
      description: Reply to all recipients of the original message.
      title: ReplyAll
    type_messages_MessageLabels:
      type: array
      items:
        type: string
      description: Labels of message.
      title: MessageLabels
    type_attachments_AttachmentSize:
      type: integer
      description: Size of attachment in bytes.
      title: AttachmentSize
    type_messages_SendMessageAttachments:
      type: array
      items:
        $ref: '#/components/schemas/type_attachments_SendAttachment'
      description: Attachments to include in message.
      title: SendMessageAttachments
    type_messages_SearchMessagesResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/type__Count'
        limit:
          $ref: '#/components/schemas/type__Limit'
        next_page_token:
          $ref: '#/components/schemas/type__PageToken'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/type_messages_SearchMessageItem'
          description: Ordered by relevance, best match first.
      required:
      - count
      - messages
      title: SearchMessagesResponse
    type__ErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        code:
          $ref: '#/components/schemas/type__ErrorCode'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
        fix:
          $ref: '#/components/schemas/type__ErrorFix'
        docs:
          $ref: '#/components/schemas/type__ErrorDocs'
      required:
      - name
      - message
      title: ErrorResponse
    type_messages_BatchUpdateMessagesResponse:
      type: object
      properties:
        limit:
          $ref: '#/components/schemas/type__Limit'
        count:
          $ref: '#/components/schemas/type__Count'
        updates:
          type: array
          items:
            $ref: '#/components/schemas/type_messages_UpdateMessageResponse'
          description: 'Updated messages with their new labels. Order matches `message_ids`

            in the request. Excluded ids are omitted, so `count` may be less than

            `limit`.'
      required:
      - limit
      - count
      - updates
      title: BatchUpdateMessagesResponse
    type_messages_SendMessageHeaders:
      type: object
      additionalProperties:
        type: string
      description: Headers to include in message.
      title: SendMessageHeaders
    type_messages_MessageFrom:
      type: string
      description: Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`.
      title: MessageFrom
    type_messages_MessageHtml:
      type: string
      description: HTML body of message.
      title: MessageHtml
    type_messages_SendMessageResponse:
      type: object
      properties:
        message_id:
          $ref: '#/components/schemas/type_messages_MessageId'
        thread_id:
          $ref: '#/components/schemas/type_threads_ThreadId'
      required:
      - message_id
      - thread_id
      title: SendMessageResponse
    type_messages_MessagePreview:
      type: string
      description: Text preview of message.
      title: MessagePreview
    type_messages_SendMessageTo:
      $ref: '#/components/schemas/type_messages_Addresses'
      description: Recipient address or addresses.
      title: SendMessageTo
    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__ErrorName:
      type: string
      description: Name of error.
      title: ErrorName
    type_threads_ThreadId:
      type: string
      description: ID of thread.
      title: ThreadId
    type__ErrorDocs:
      type: string
      description: Link to the error reference entry for this code.
      title: ErrorDocs
    type_messages_MessageText:
      type: string
      description: Plain text body of message.
      title: MessageText
    type_messages_Addresses:
      oneOf:
      - type: string
      - type: array
        items:
          type: string
      title: Addresses
    type_messages_BatchGetMessagesRequest:
      type: object
      properties:
        message_ids:
          $ref: '#/components/schemas/type_messages_BatchGetMessagesMessageIds'
      required:
      - message_ids
      title: BatchGetMessagesRequest
    type__ErrorMessage:
      type: string
      description: Error message.
      title: ErrorMessage
    type_messages_SendMessageBcc:
      $ref: '#/components/schemas/type_messages_Addresses'
      description: BCC recipient address or addresses.
      title: SendMessageBcc
    type_attachments_AttachmentContentType:
      type: string
      description: Content type of attachment.
      title: AttachmentContentType
    type__IncludeUnauthenticated:
      type: boolean
      description: Include unauthenticated in results.
      title: IncludeUnauthenticated
    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

       

# --- 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