✉ MailCraft API Reference

Transactional

Send with attachments

Verified
POST/api/v1/transactional/send

Same endpoint with Base64 attachments. Over 1 MiB total → HTML 413 from the gateway (~700 KB raw file max).

Body Parameters

Notes

Live 2026-11-03. Attachment item = { filename (required), content (required, Base64), contentType (optional) }. Missing contentType is stored as application/octet-stream, empty content is accepted (sizeBytes 0). Server limit: more than 10 -> 400. INVALID Base64 -> 400. THE 10 MB/FILE LIMIT IS NOT REACHABLE: nginx rejects any request body over 1 MiB (1,048,576 bytes) with an HTML 413 before the API sees it (933,574 B passed, 1,066,906 B failed), so the practical per-request ceiling is ~700 KB of raw file data.

Errors

StatusCaseBody
400errorTooMany{"error": {"code": "ValidationFailed", "message": "A send cannot have more than 10 attachments."}}
400errorBadBase64{"error": {"code": "ValidationFailed", "message": "Attachment \"a.txt\" has invalid Base64 content."}}
400errorNoContent{"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1", "title": "One or more validation errors occurred.", "status": 400, "errors": {"Attachments[0].Content": ["The Content field is required."]}, "traceId": "00-…-…-00"}
400errorNoFilename{"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1", "title": "One or more validation errors occurred.", "status": 400, "errors": {"Attachments[0].Filename": ["The Filename field is required."]}, "traceId": "00-…-…-00"}
413errorTooLarge(empty)

Snippets use the MailCraftApi (C#) and MailCraft (Python) helpers from Introduction → Helpers.