{"uid":"cap_LhvB25YiUnCGYIEf7Vb-D","slug":"agentmail-get-thread-attachment-8b12aec5","name":"AgentMail Get Thread Attachment","description":"AgentMail gives AI agents real email inboxes. Create, send, receive, and search messages via REST API — built for autonomous agents and agentic workflows.","url":"https://x402.api.agentmail.to/v0/threads/%7Bthread_id%7D/attachments/%7Battachment_id%7D","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","pathParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"pathParams":{"type":"object","required":["thread_id","attachment_id"],"properties":{"thread_id":{"type":"string"},"attachment_id":{"type":"string"}},"additionalProperties":false},"queryParams":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","additionalProperties":true}},"additionalProperties":false}},"additionalProperties":false},"responseSchema":{"type":"json","example":{}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"proven_free","priceSource":"registry","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":{"kind":"free","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"free","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_OwJ3US2WtffjNTe0H4YFU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves a specific email attachment by its ID from a given email thread in an AI agent's inbox","exampleAgentPrompt":"Can you grab the attachment with ID att_abc123 from email thread thd_xyz789 in my AgentMail inbox so I can read what's in it?","exampleUseCases":[{"title":"Support agent retrieves customer invoice attachment","prompt":"Pull the invoice PDF that was attached to the customer's latest support ticket email—I need to verify the charges before we process their refund request."},{"title":"Finance workflow extracts receipt from expense report","prompt":"Get the receipt attachment from that vendor email thread so I can match it against the purchase order and complete the expense reconciliation."},{"title":"HR agent accesses signed document from candidate","prompt":"Grab the employment contract PDF that was sent to the candidate last week so I can check if they've signed it and are ready to onboard."}],"resultDescription":"Returns a JSON object containing the attachment data for the specified attachment ID within the given thread, including file content, metadata, and any relevant properties of the attachment.","failureModes":["Thread ID not found — 404 error if the thread does not exist","Attachment ID not found — 404 error if the attachment does not exist within the thread","Unauthorized access — 401 if the agent lacks permission to access the inbox","Invalid path parameters — 400 if thread_id or attachment_id are malformed","Rate limiting — 429 if too many requests are made in a short period"],"whenToPreferThis":"Use this endpoint when an AI agent needs to retrieve a specific, known attachment from an email thread — for example, when processing an email workflow that involves reading a PDF, spreadsheet, or other file that was attached to a message. Prefer this over listing endpoints when you already have both the thread ID and attachment ID.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-08T12:44:52.828Z","isFirstParty":false}