Skip to main content
GET
Every file attached to a message — one your agent sent, or one that arrived in an inbound email — is stored and addressable by its att_... id. Message detail (GET /v1/messages/{id}) and thread responses include an attachments array with each file’s id, filename, contentType, and sizeBytes. Use this endpoint to read the actual file: parse a received CSV, archive a signed PDF, or inspect a document your agent was sent.

Path parameters

string
required
The attachment ID (att_...) from a message’s attachments array.

Query parameters

boolean
default:"false"
Set inline=1 to render in a browser tab instead of downloading. Only honoured for types that are safe to render (image/png, image/jpeg, image/gif, image/webp, application/pdf, text/plain); every other type is always served as a download so hostile HTML/SVG can never run on your origin.

Response

The raw file bytes with Content-Type, Content-Length, and Content-Disposition headers. Tenancy is enforced: an attachment belonging to another organization returns 404, and an inbox-scoped key can only read files on messages in its own inbox (403 inbox_access_denied otherwise). If the record exists but the stored file was already removed by the plan’s retention policy, the API returns 410 attachment_bytes_missing.

Reading attachments from an agent (MCP)

Claude Code, Cursor, and other MCP clients get this through the gork_read_attachment tool: text files are returned decoded, binary files come back base64-encoded (files over 2MB return metadata only, with a pointer to the endpoint). See Connect your AI for the setup.