Skip to main content

attachment_too_large

The files on a single message exceed the 40MB total. The limit covers everything attached to that message, not each file on its own. Nothing was sent and nothing was charged.

Status: 413

{
"status": 413,
"type": "attachment_too_large",
"message": "Total attachment size exceeds the 40MB limit",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/attachment_too_large"
}

Why you got this​

  • Several files that are each acceptable go over 40MB once added together.
  • One file is over 40MB by itself.
  • An uncompressed export, video or design file was attached rather than linked.
  • A generated report grew over time and crossed the limit without the sending code changing.

How to fix it​

Bring the total under 40MB, or leave the largest file out and put a link to it in the message body. A link is the better answer for anything sizeable: most receiving servers cap incoming mail well below 40MB, so a message we accept can still be refused at the far end.

Pre-uploading does not help here. POST /attachments keeps the request body small, which is what payload_too_large is about, but the 40MB total applies whether the file is inlined or referenced by id.

Is it safe to retry​

No, not unchanged. The same files exceed the same limit every time. Rebuild the message with smaller or fewer attachments and send it again.

Reusing the Idempotency-Key is safe, because a rejected request was never stored.