Skip to main content
Sentvia supports file attachments on both outbound and inbound messages. You send files as base64-encoded payloads on the message request, and Sentvia stores every inbound attachment automatically — surfacing a signed download URL whenever you retrieve the message.

Sending attachments

Include an attachments array on POST /messages (the same field works on reply and forward requests). Each item needs a filename, a content_type, and the file’s bytes encoded as content_base64:
Request body
{
  "inbox_id": "...",
  "to": ["customer@example.com"],
  "subject": "Your invoice",
  "text": "Please find your invoice attached.",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "content_type": "application/pdf",
      "content_base64": "JVBERi0..."
    }
  ]
}

Receiving attachments

Inbound attachments are stored automatically and appear on every message retrieval — in webhook payloads, GET /messages/{id}, and GET /threads/{id}:
Attachment object
{
  "attachments": [
    {
      "id": "a_...",
      "filename": "receipt.pdf",
      "mime_type": "application/pdf",
      "size_bytes": 48213,
      "url": "https://...signed..."
    }
  ]
}
The url field is a short-lived signed download link — fetch the file bytes directly from storage with no additional authentication. When the link expires, call GET /attachments/{id} to mint a fresh one at any time.

Size limit

Email providers cap total message size. A single email’s attachments must fit within ~7 MB so the base64-encoded message stays under the 10 MB provider limit. Attempting to send an oversized attachment returns 413 attachment_too_large before the message is dispatched — it is never a silent failure.
Need to move larger files? Contact us about large-file support with direct-to-storage uploads, available on higher plans.

Storage limits

Sentvia stores every inbound attachment against a per-plan cap:
PlanStorage
Free1 GB
Pro20 GB
Scale100 GB
Business500 GB
Sending an attachment that would push you over your cap returns 402 storage_limit_reached. Your outbound send is blocked, but inbound mail is never rejected — messages always arrive and are stored, and the dashboard warns you as you approach your limit. Track current usage on the Overview page.