Sign inGet Started

Get an attachment

GET
/v1/amb/attachments/{attachment_id}
bird amb attachments get <attachment-id>
प्रतिक्रिया200
{
  "id": "aat_01krdgeqcxet5s7t44vh8rt9mg",
  "business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
  "origin": "received",
  "message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
  "name": "receipt.pdf",
  "mime_type": "application/pdf"
}

Returns the metadata of an attachment by its aat_ ID. origin says whether a customer sent it, you sent it, or you uploaded it; a message attachment carries its message_id. expires_at is Bird's estimate of when Apple stops holding the attachment. A send within 24 hours of expires_at is refused. An unknown ID returns 404.

पैरामीटर

attachment_idstring

Attachment identifier. Starts with aat_.

Response Payload

id
string
आवश्यक

Send it as attachment_id.

business_account_id
string
आवश्यक

The business account Apple holds the attachment for.

origin
string
आवश्यक

How Bird obtained an attachment:

  • received: A customer sent it in a message.
  • sent: You sent it in a message by source_url.
  • uploaded: You uploaded it with createAMBAttachment.

Possible values: received, sent, uploaded

message_id
string

The message the attachment belongs to.

name
string
आवश्यक

Display filename. May be empty for an attachment stored before this release.

mime_type
string
आवश्यक

Media type of the attachment. May be empty for an attachment stored before this release.

size
integer
आवश्यक

Attachment size in bytes. May be 0 for an attachment stored before this release.

expires_at
string
आवश्यक

Bird's estimate of when Apple stops holding the attachment, 30 days after it was received, uploaded or last sent. A send within 24 hours of this time is refused.

created_at
string
आवश्यक

When Bird stored the attachment.

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।