Skip to main content
GET
Get Message Attachment
Fetches metadata for one attachment on a message. 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. Attachment ids come from the attachments array on get_agentmail_inbox_message. The thread-level and draft-level twins are get_agentmail_inbox_thread_attachment and get_agentmail_inbox_draft_attachment.

Example

First time? Point any MCP client at https://mcp.aisa.one/mcp — Claude Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client opens a browser, you click Allow once, and there is no key to paste. The commands per client, and what each call costs, are on aisa.one/mcp.
Set this endpoint up in your agent →

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

inbox_id
string
required

The ID of the inbox.

message_id
string
required

ID of message.

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.