Skip to main content
GET
Get Any Draft Attachment
Fetches metadata for one attachment on a draft addressed by id alone. Returns attachment_id, filename, size, content_type, content_disposition, content_id and a short-lived download_url with expires_at. The bytes are not inlined — fetch download_url before it expires. This is the organization-wide view spanning every inbox in the account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created; the inbox-scoped twin get_agentmail_inbox_draft_attachment is the one to use when a single inbox is meant.

Example

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer authentication

Path Parameters

draft_id
string
required

ID of draft.

attachment_id
string
required

ID of attachment.

Response

Response with status 200

attachment_id
string
required

ID of attachment.

size
integer
required

Size of attachment in bytes.

download_url
string
required

URL to download the attachment.

expires_at
string<date-time>
required

Time at which the download URL expires.

filename
string

Filename of attachment.

content_type
string

Content type of attachment.

content_disposition
enum<string>

Content disposition of attachment.

Available options:
inline,
attachment
content_id
string

Content ID of attachment.