Skip to content

List message attachments

View .md
GET

List the stored file attachments for an email message and get a short-lived signed downloadUrl for each. Works for both inbound emails (received via message.inbound) and outbound emails you sent with attachments. Messages without stored attachments (including SMS, WhatsApp, and other channels) return an empty list. Each downloadUrl is generated fresh per request and expires — fetch the file promptly and do not cache the URL.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • messageIdstringrequired

Responses

200List of attachments.
  • itemsobject[]required
    8 properties
    • idstringrequired
    • filenamestringrequired
    • mimeTypestringrequired

      MIME type of the attachment.

    • sizeintegerrequired

      Size of the attachment in bytes.

    • contentIdstringrequirednullable

      Content-ID for inline attachments (referenced in the HTML body as cid:<contentId>). Null for regular attachments.

    • isInlinebooleanrequired

      Whether the attachment is inline (embedded in the HTML body) rather than a regular attachment.

    • downloadUrlstring<uri>requirednullable

      Short-lived signed URL to download the attachment bytes. Freshly generated on each request and expires; do not cache it. Null if the stored file is no longer available.

    • createdAtstring<date-time>required
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Message not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject