amb-messages

Get a message attachment

Downloads the attachment at the zero-based index in a message's content.attachments array and returns its decrypted bytes with the media type the attachment declares. A declared PNG, JPEG, GIF or WebP type is kept only when the bytes match it; a missing, malformed or mismatched type returns application/octet-stream. The Content-Disposition header carries the original filename. Works for attachments a customer sent and for attachments you sent. For a received attachment, message_id is the message.id of the amb.received webhook event, and index is the attachment's position in that message's content.attachments array.

Apple retains an attachment for 30 days, renewed each time its reference is reused; availability after that period is not guaranteed, so download an attachment when the message arrives rather than on demand later. An unknown message or index returns 404; an unavailable or expired Apple reference returns 503.

get/v1/amb/messages/{message_id}/attachments/{index}

Request

  • Base URL: https://us1.platform.bird.com
  • URL: https://us1.platform.bird.com/v1/amb/messages/{message_id}/attachments/{index}
  • Auth: one of:
    • HTTP bearer
    • API key in cookie bird_session

Path parameters

message_idstring required
Example:amb_01krdgeqcxet5s7t44vh8rt9mg

Message identifier. Starts with amb_. For a received attachment, use the message.id from the amb.received webhook event.

indexinteger required

Zero-based position in the message's content.attachments array.

Headers

X-Workspace-Idstring

Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.

X-Organization-Idstring

Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

Response

The raw attachment bytes.

Changes

No recorded changes to this operation across all 2 revisions of this API.