For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
  • API Reference
      • GETList Inboxes
      • GETGet Inbox
      • POSTCreate Inbox
      • PATCHUpdate Inbox
      • DELDelete Inbox
        • GETList Threads
        • GETGet Thread
        • GETGet Attachment
        • PATCHUpdate Thread
        • DELDelete Thread
LogoLogo
contact@agentmail.ccDiscord
API ReferenceInboxesThreads

Get Attachment

GET
/v0/inboxes/:inbox_id/threads/:thread_id/attachments/:attachment_id
GET
/v0/inboxes/:inbox_id/threads/:thread_id/attachments/:attachment_id
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.inboxes.threads.get_attachment(
8 inbox_id="inbox_id",
9 thread_id="thread_id",
10 attachment_id="attachment_id",
11)
1{
2 "attachment_id": "attachment_id",
3 "size": 1,
4 "download_url": "download_url",
5 "expires_at": "2024-01-15T09:30:00Z",
6 "filename": "filename",
7 "content_type": "content_type",
8 "content_disposition": "inline",
9 "content_id": "content_id"
10}
**CLI:** ```bash agentmail inboxes:threads get-attachment --inbox-id <inbox_id> --thread-id <thread_id> --attachment-id <attachment_id> ```
Was this page helpful?
Previous

Update Thread

Next
Built with

CLI:

$agentmail inboxes:threads get-attachment --inbox-id <inbox_id> --thread-id <thread_id> --attachment-id <attachment_id>

Authentication

AuthorizationBearer

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

Path parameters

inbox_idstringRequired
The ID of the inbox.
thread_idstringRequired
ID of thread.
attachment_idstringRequired
ID of attachment.

Response

This endpoint returns an object.
attachment_idstring
ID of attachment.
sizeinteger
Size of attachment in bytes.
download_urlstring
URL to download the attachment.
expires_atdatetime
Time at which the download URL expires.
filenamestring
Filename of attachment.
content_typestring
Content type of attachment.
content_dispositionenum
Content disposition of attachment.
Allowed values:
content_idstring
Content ID of attachment.

Errors

404
Not Found Error