Mailbox API

Batch get mailbox messages

Changed on

Returns exact messages by ID. Use body_mode to choose summary-only output, raw body output, or clean JSON content. Attachment output remains metadata only; attachment contents are not parsed.

post/mailbox/messages:batch-get

Request

  • Base URL: https://app.sendmux.ai/api/v1
  • URL: https://app.sendmux.ai/api/v1/mailbox/messages:batch-get
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: mailbox.read)

Query parameters

mailbox_idstring

Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.

Request body

body_mode'none' | 'raw' | 'clean_json'

Body shape to include for each message.

idsstring[] required

Message IDs to fetch, maximum 100.

include_attachments'none' | 'metadata'

Attachment detail to include. Contents are not returned.

include_headers'none' | 'selected' | 'full'

Header detail to include in each message.

include_htmlboolean

When true, include HTML content when available.

include_linksboolean

When true, include links extracted from the body.

max_body_charsinteger

Maximum body characters per message before truncation.

part'auto' | 'text' | 'html' | 'both'

Body part to return when body_mode is not none.

strip_quotesboolean

When true, remove quoted reply text.

strip_signatureboolean

When true, remove detected email signatures.

Response

Batch message result

oktrue required

Example response

{
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "messages": [
      {
        "content": {
          "attachments": [
            {
              "content_type": "application/pdf",
              "disposition": "attachment",
              "download_url": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
              "filename": "invoice.pdf",
              "size_bytes": 12345
            }
          ],
          "headers": {
            "selected": {
              "reply_to": [
                {
                  "email": "agent@example.com",
                  "name": "Support"
                }
              ]
            }
          },
          "participants": {
            "bcc": [
              {
                "email": "agent@example.com",
                "name": "Support"
              }
            ],
            "cc": [
              {
                "email": "agent@example.com",
                "name": "Support"
              }
            ],
            "from": {
              "email": "agent@example.com",
              "name": "Support"
            },
            "reply_to": [
              {
                "email": "agent@example.com",
                "name": "Support"
              }
            ],
            "to": [
              {
                "email": "agent@example.com",
                "name": "Support"
              }
            ]
          }
        },
        "message": {
          "attachments": [
            {
              "content_type": "application/pdf",
              "disposition": "attachment",
              "download_url": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
              "filename": "invoice.pdf",
              "size_bytes": 12345
            }
          ],
          "bcc": [
            {
              "email": "agent@example.com",
              "name": "Support"
            }
          ],
          "cc": [
            {
              "email": "agent@example.com",
              "name": "Support"
            }
          ],
          "from": {
            "email": "agent@example.com",
            "name": "Support"
          },
          "keywords": [
            "$seen",
            "$flagged",
            "agent_triaged"
          ],
          "to": [
            {
              "email": "agent@example.com",
              "name": "Support"
            }
          ]
        }
      }
    ]
  }
}

Changes

    • info

      added the required property ////////// to the response with the status

    • info

      added the required property ////////// to the response with the status

    • breaking

      the //// response's property type changed from object null to no type for status

    • breaking

      the //// response's property type changed from object null to no type for status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • breaking

      removed the required property ///// from the response with the status

    • info

      removed subschema #2 from the ///// response property allOf list for the response status

    • info

      added subschema #2 to the ///// response property anyOf list for the response status

    • info

      added subschema #2 to the //// response property anyOf list for the response status

    • info

      added subschema #2 to the //// response property anyOf list for the response status