{"uid":"cap_bPCMuSPhdu5RBDCylrkDI","slug":"agentmail-attachment-id-4d9812e5","name":"AgentMail Get Attachment","description":"Get Attachment","url":"https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/messages/:message_id/attachments/:attachment_id?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["inbox_id","message_id","attachment_id"],"properties":{"inbox_id":{"type":"string","title":"InboxId","description":"The ID of the inbox."},"message_id":{"type":"string","title":"MessageId","description":"ID of message."},"attachment_id":{"type":"string","title":"AttachmentId","description":"ID of attachment."}}},"responseSchema":{"type":"object","title":"AttachmentResponse","required":["attachment_id","size","download_url","expires_at"],"properties":{"size":{"type":"integer","title":"AttachmentSize","description":"Size of attachment in bytes."},"filename":{"type":"string","title":"AttachmentFilename","description":"Filename of attachment."},"content_id":{"type":"string","title":"AttachmentContentId","description":"Content ID of attachment."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."},"content_type":{"type":"string","title":"AttachmentContentType","description":"Content type of attachment."},"download_url":{"type":"string","description":"URL to download the attachment."},"attachment_id":{"type":"string","title":"AttachmentId","description":"ID of attachment."},"content_disposition":{"enum":["inline","attachment"],"type":"string","title":"AttachmentContentDisposition","description":"Content disposition of attachment."}}},"example":null,"exampleRequest":null,"tags":["email","inboxes","domains","drafts","threads","webhooks","messaging","ai","social"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"unprobed","priceSource":"unknown","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"Free","primary":null,"accepted":[]},"paymentMethods":[],"brandName":"AgentMail","brandSlug":"agentmail","brandBaseUrl":"https://agentmail.to","brandDocsUrl":"https://docs.agentmail.to","whatItDoes":"Retrieves metadata and a temporary download URL for a specific email attachment in an AgentMail inbox message","exampleAgentPrompt":"Fetch the attachment with ID att_abc123 from message msg_xyz789 in inbox inbox_001 on AgentMail — I need the filename, content type, and download URL so I can process the file.","exampleUseCases":[{"title":"Extract invoice PDF from customer email","prompt":"I just got an email from a client with an attached invoice. Can you grab that attachment and get me the download link so I can parse the invoice details and log them in our system?"},{"title":"Verify document type before processing","prompt":"Before my agent processes files from incoming messages, I need you to fetch the attachment metadata and tell me the content type and file size — make sure it's actually a PDF and not something unexpected."},{"title":"Retrieve image from support ticket","prompt":"A customer submitted a support ticket with a screenshot attached. Pull that attachment for me and give me the filename and download URL so I can analyze the image and understand their issue."}],"resultDescription":"Returns an AttachmentResponse object containing the attachment ID, file size in bytes, filename, content type (e.g. application/pdf), content disposition (inline or attachment), content ID, a temporary download URL, and the datetime when that URL expires.","failureModes":["404 Not Found if the inbox_id, message_id, or attachment_id does not exist or is not accessible","401 Unauthorized if the Bearer token is missing or invalid","403 Forbidden if the authenticated user does not have access to the specified inbox","410 Gone if the download URL has already expired","400 Bad Request if required path parameters are malformed or missing"],"whenToPreferThis":"Use this endpoint when an AI agent has already retrieved a message listing and needs to access the binary content or metadata of a specific attachment by its known ID. Prefer this over listing attachments when the attachment_id is already known from a prior message fetch.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:43:05.769Z","isFirstParty":false,"canonicalSlug":"agentmail-attachment-id-ba1c5507"}