Send email
Production checklist
Section titled “Production checklist”Verify the Runtime, authenticate the From domain, create a sending-only key, and test with a verified destination first. Cloudflare Workers Paid is required for arbitrary production recipients. Choose essential, transactional or subscription deliberately; subscription messages require a topic.
Minimal request
Section titled “Minimal request”curl "$ALL2CF_SEND_URL/emails" \ -H "Authorization: Bearer $ALL2CF_SEND_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: receipt-order-1048" \ -d '{"from":"Store <hello@example.com>","to":"buyer@example.net","subject":"Receipt","html":"<h1>Paid</h1>"}'Use a unique business identifier as Idempotency-Key and reuse it when retrying the same request. Reusing it with a different payload is rejected. The response contains the message ID; use Emails or GET /emails/:id to follow delivery.
Rich messages
Section titled “Rich messages”Add cc, bcc, reply_to, text and HTML, tags, custom headers, metadata, template variables, scheduled time and attachments. Tags allow at most 75 name/value pairs; values use 1–256 ASCII letters, numbers, _ or -. Attachment content is Base64 or a public HTTPS path. Executable/script types are rejected; remote downloads are capped at 25 MiB and Cloudflare’s delivered message limit remains 5 MiB.
Batch and scheduling
Section titled “Batch and scheduling”Use POST /emails/batch and choose strict or permissive validation. Schedule with scheduled_at; update or cancel before dispatch. Retry 429 and eligible 5xx responses with exponential backoff and the same idempotency key. Do not retry validation, credential, policy or suppression errors unchanged.