Receiving attachments
Bytes on webhook, message show, and a download URL.
Files on inbound mail are available in the dashboard, on the API, and on the webhook. Where you get the bytes depends on the channel.
Where the bytes are
| Channel | What you get |
|---|---|
Message list (GET …/inbound_messages) |
Metadata only: filename, content_type, size |
Message show (GET …/inbound_messages/:id) |
Metadata plus content_base64 |
| JSON webhook | Metadata plus content_base64, unless the body would pass 4 MB |
Download URL (GET …/attachments/:index) |
The raw file |
| Dashboard | Download on each attachment in the message view |
Attachments are numbered from 1, in the order they appear in the message.
PostShiba keeps the same file types it lets you send: images (including SVG and HEIC), PDF, EPUB, Office and OpenDocument files, RTF, plain text, CSV, zip archives, contact cards, and calendar invites. Other files, such as programs, scripts, and HTML pages, are left out. Mail carrying a virus is refused before it reaches your inbox.
With retention off, bytes are removed from every channel once the webhook delivers: the show's content_base64 is null, the API download returns 410, and the dashboard shows the file name without a download link. Without a webhook, the bytes stay for 7 days. See Retention and storage.
Large webhooks
Many webhook receivers refuse bodies over 5 MB. When a webhook body with every file would pass 4 MB, PostShiba sends it without the file bytes. Each attachment keeps its filename, content_type, and size, and content_base64 is null. Fetch each file from the download URL with your API key. PostShiba keeps those files until the message expires, even with retention off.
A sendgrid_parse webhook over 4 MB leaves out email, attachment-info, and the attachment1 fields. attachments still holds the file count.
Over MCP
get_inbound_message returns attachment metadata without raw or content_base64. download_attachment_inbound_message returns files up to 1 MB inline. A larger file returns its download URL, which you fetch with an API key.
Attachment fields
SendGrid Inbound Parse format
A sendgrid_parse webhook sends files as form fields attachment1, attachment2, and so on. attachment-info is JSON with each file's name and type. The email field holds the raw MIME.
Download steps are on Managing received emails. Full fields are on Inbound messages.