Skip to main content
GET
Inboxes - Get Attachment
获取单封邮件上某个附件的元数据。返回 attachment_id、filename、size、content_type、content_disposition、content_id,以及一个短时效的 download_url 和 expires_at。字节内容不内联,需在过期前去取 download_url。附件 id 来自 get_agentmail_inbox_message 返回的 attachments 数组。会话级和草稿级的孪生工具是 get_agentmail_inbox_thread_attachment 与 get_agentmail_inbox_draft_attachment。

示例

第一次用? 把任意 MCP 客户端指向 https://mcp.aisa.one/mcp —— Claude Code、 Codex、Cursor、VS Code 都可以。鉴权走 OAuth:客户端打开浏览器,你点一次 Allow,不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见 aisa.one/zh-cn/mcp。
在你的 agent 里把这个端点跑起来 →

授权

Authorization
string
header
必填

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

路径参数

attachment_id
string
必填

附件 ID。

inbox_id
string
必填

收件箱的 ID。

message_id
string
必填

消息 ID。

响应

状态码为 200 的响应

attachment_id
string
必填

附件 ID。

size
integer
必填

附件大小(字节)。

download_url
string
必填

Signed HTTPS CDN URL to download the attachment bytes. Retrieve a fresh URL when needed rather than storing it permanently.

expires_at
string<date-time>
必填

Time at which download_url and text_url (when present) expire. Retrieve the attachment again to obtain fresh URLs.

filename
string

附件文件名。

content_type
string

附件的内容类型。

content_disposition
enum<string>

附件的内容处置方式。

可用选项:
inline,
attachment
content_id
string

附件的内容 ID。

text_url
string

Signed HTTPS CDN URL to download extracted plain text, when available. Omitted when no extracted text is available. Expires at the same time as download_url.