Send transactional email for user domain with optional attachments
POST /api/domains/{domain}/message
Send a transactional email for a specific domain owned by the authenticated user. This endpoint is designed for user-authenticated requests where the user owns and manages the domain. Supports comprehensive email customization, bulk sending, file attachments with advanced processing, and asynchronous job handling for optimal performance. Perfect for building custom email solutions and transactional workflows.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
example.comDomain name that must be owned by the authenticated user. This domain must be verified and configured with SMTP credentials.
Request Body required
Section titled “Request Body required ”Complete email configuration including content, recipients, and optional attachments with processing options.
object
Sender email address. Must belong to the authenticated domain. Used for envelope sender and Return-Path header.
Example
Optional sender display name. If not provided, will use the email address only.
Example
Company NameEmail subject line. Supports Unicode characters, emojis, and variable content. Keep under 78 characters for optimal display across email clients.
Example
Your Order Confirmation - #12345Required plain text content for the email body. This will be used as fallback for email clients that don’t support HTML. Line breaks will be preserved.
Example
Dear Valued Customer,\n\nThank you for your recent order #12345. Your items are being prepared for shipment.\n\nOrder Details:\n- Product: Premium Widget\n- Quantity: 2\n- Total: $49.99\n\nTracking information will be sent once your order ships.\n\nBest regards,\nCustomer Service TeamOptional HTML content for the email body. If provided, this will be used for HTML email clients. Should be a complete HTML document or HTML fragment.
Example
<html><body><h2>Order Confirmation - #12345</h2><p>Dear Valued Customer,</p><p>Thank you for your recent order #12345. Your items are being prepared for shipment.</p><h3>Order Details:</h3><ul><li>Product: Premium Widget</li><li>Quantity: 2</li><li>Total: $49.99</li></ul><p>Tracking information will be sent once your order ships.</p><p>Best regards,<br>Customer Service Team</p></body></html>object
Example
{ "X-Order-ID": "12345", "X-Customer-Tier": "premium", "X-Tags": "newsletter,promo", "X-Priority": "3"}Example
{"X-Order-ID": "12345", "X-Customer-Tier": "premium", "X-Tags": "newsletter,promo"}Reply-to email address. Must share the same top-level domain as the ‘from’ address for security compliance.
Example
Single file attachment
Multiple file attachments
Advanced attachment processing configuration as JSON string. Enables compression, password protection, and watermarking features.
Example
{"compress": true, "password": "SecureDoc2024", "watermark": {"enabled": true, "text": "CONFIDENTIAL", "position": "center"}}Responses
Section titled “ Responses ”Email send jobs successfully dispatched for asynchronous processing
object
Request processing success status
Example
trueDetailed success message including recipient count, job batching information, and attachment count
Example
Email send jobs dispatched for 5 recipients in 1 job(s) with 2 attachment(s)Headers
Section titled “Headers ”Maximum requests per minute
Remaining requests in current window
Bad Request - Missing authentication or invalid request structure
object
Example
User authentication missingUnauthorized - Invalid user credentials or session expired
object
Example
Authentication requiredDomain not found or user does not own the specified domain
object
Example
Domain not found or you do not own this domain.Validation Error - Invalid input data, business rule violations, or configuration issues
Too Many Requests - Rate limit exceeded. Retry after the specified time.
object
Example
Too many attempts. Please try again later.Headers
Section titled “Headers ”Seconds until rate limit resets
Maximum requests per minute
Remaining requests in current window
Internal Server Error - Unexpected system error during processing
object
Example
An error occurred while sending the message. Please try again.