Send transactional email for user domain using a saved template
POST /api/domains/{domain}/message/template
Send an email for a domain owned by the authenticated user using a stored template. Supports variable replacement using {{variable}} syntax in both subject and content. Template must belong to the authenticated domain. Supports attachments with the same processing options as non-template message endpoint.
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
Request Body required
Section titled “Request Body required ”object
UUID of the template to use
Example
550e8400-e29b-41d4-a716-446655440000Sender email address. Must belong to the authenticated domain. Defaults to noreply@{domain} if not provided.
Example
Optional sender display name. If not provided, will use the email address only.
Example
Company NameSingle set of variables for all recipients
object
Example
{ "name": "John Doe", "product": "Premium Widget"}Array of variable objects, one per recipient
object
Example
[ { "name": "John", "product": "Widget A" }, { "name": "Jane", "product": "Widget B" }]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
JSON string with attachment processing options. Watermark text is limited to 50 characters.
Example
{"compress": true, "password": "secret123", "watermark": {"enabled": true, "text": "CONFIDENTIAL"}}Responses
Section titled “ Responses ”Template-based email jobs dispatched
object
Example
trueExample
Template-based email jobs dispatched for 2 recipients in 1 job(s)Example
550e8400-e29b-41d4-a716-446655440000Example
Welcome EmailHeaders
Section titled “Headers ”Maximum requests per minute
Remaining requests in current window
Unauthorized - Invalid or missing authentication credentials
object
Example
UnauthorizedNot Found - Domain or template not found
object
Example
Domain not found or you do not own this domain.Validation Error - Invalid input data
object
Example
Validation failed.Field-specific validation errors
object
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
Server Error - Unexpected error occurred
object
Example
An error occurred while sending the template message. Please try again.