# Send batch of different emails Send up to 500 completely different emails in a single API call. Batch sending where each email can have: - Different recipient - Different subject - Different content - Different settings - File attachments - Calendar invites Perfect for sending multiple transactional emails at once (order confirmations, password resets, etc.). Limits: - Maximum 500 emails per batch - Each email validated independently - Failed emails don't affect successful ones Use cases: - Sending different transactional emails simultaneously - Mixed email types in one API call - High-volume transactional sending Not for: Newsletter-style emails with same content → Use /api/bulk-send instead Endpoint: POST /api/v1/batch Version: 1.0.0 Security: ApiKeyAuth ## Request fields (application/json): - `emails` (array, required) Array of emails to send (max 500) - `emails.to` (string, required) Recipient email address Example: "user@example.com" - `emails.from` (string) From email (must use verified domain, optional) Example: "hello@mail.yourdomain.com" - `emails.domain` (string) Sending domain (optional - auto-selects if omitted) Example: "mail.yourdomain.com" - `emails.reply_to` (string) Reply-to address Example: "support@yourdomain.com" - `emails.cc` (array) CC recipients - `emails.bcc` (array) BCC recipients - `emails.subject` (string, required) Email subject Example: "Your order has shipped" - `emails.html` (string) HTML email body Example: "

Order shipped!

" - `emails.text` (string) Plain text body Example: "Your order has shipped" - `emails.track_opens` (boolean) Enable open tracking - `emails.track_clicks` (boolean) Enable click tracking - `emails.headers` (object) Custom headers - `emails.tag` (string) Tag for organizing - `emails.metadata` (object) - `emails.attachments` (array) File attachments (sent directly, not stored) - `emails.attachments.filename` (string, required) Example: "invoice.pdf" - `emails.attachments.content` (string, required) Base64 encoded content - `emails.attachments.contentType` (string, required) Example: "application/pdf" - `emails.icalEvent` (string) iCal calendar event in RFC 5545 format (sent directly, not stored) - `emails.stream_type` (string) Stream type for delivery optimization: - transactional: Order confirmations, password resets, account notifications - broadcast: Marketing emails, newsletters, promotional campaigns - shared: General purpose (default) Enum: "transactional", "broadcast", "shared" ## Response 200 fields (application/json): - `total` (integer) Total emails in batch - `queued` (integer) Successfully queued emails - `failed` (integer) Failed emails - `results` (array) Successfully queued emails - `results.index` (integer) Index in original array - `results.to` (string) Recipient - `results.email_id` (string) Email ID for tracking - `results.message_id` (string) Message-ID header - `results.status` (string) Enum: "queued" - `errors` (array) Failed emails (only if any failed) - `errors.email` (string) Email address or identifier - `errors.error` (string) Error message ## Response 400 fields (application/json): - `error` (string) - `message` (string) ## Response 403 fields (application/json): - `error` (string) - `message` (string) - `reason` (string) ## Response 404 fields (application/json): - `error` (string) - `message` (string) ## Response 500 fields (application/json): - `error` (string) - `message` (string)