Send Transactional Email
Send individual transactional emails without requiring a campaign
https://lumail.io/api/v1/emails
Send individual transactional emails directly to subscribers without creating a campaign. Perfect for welcome emails, password resets, order confirmations, and other automated communications.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Email address to send the email to (subscriber will be created if doesn't exist) |
subject | string | Yes | Email subject line |
content | string | Yes | Email content (format depends on contentType) |
contentType | string | No | Content format: MARKDOWN (default), HTML, or TIPTAP |
preview | string | No | Email preview text shown in email clients |
replyTo | string | No | Reply-to email address (must be valid email format) |
from | string | Yes | Sender email address (domain must be verified) |
Response
- Success (200 OK) - Email queued successfully for sending
- Error (400 Bad Request) - Invalid request data
- Error (401 Unauthorized) - Invalid or missing API token
- Error (404 Not Found) - Subscriber not found
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
message | string | Success message |
qstashMessageId | string | Unique ID for tracking the queued email |
Content Types
Choose the format that best fits your use case:
| Type | Description | Best For |
|---|---|---|
MARKDOWN | Plain text with Markdown formatting (default) | Simple emails, quick integration |
HTML | Raw HTML content | Full design control, existing templates |
TIPTAP | Tiptap JSON format (same as Lumail editor) | Complex layouts, programmatic generation |
See detailed documentation for each format:
Email Content Format
The content field uses Markdown format. You can include various elements:
Basic Text
Hello {{name}}, this is a basic email.
Formatted Text
This is **bold text** and this is _italic text_.
Headings and Lists
# Welcome {{name}}!
## Benefits
- First benefit
- Second benefit
- Third benefit
### Getting Started
1. Step one
2. Step two
3. Step three
Links and Images
Visit our [website](https://example.com) for more information.

Variable Substitution
You can use variables in your email content that will be automatically replaced with subscriber data:
{{name}}- Subscriber's name{{email}}- Subscriber's email address{{phone}}- Subscriber's phone number{{unsubscribeUrl}}- Automatic unsubscribe link{{customField}}- Any custom field defined for the subscriber
Domain Verification
The from email address domain must be verified in your account. The API will:
- Extract the domain from the
fromemail address - Verify the domain is authorized and verified for your organization
- Reject the request if the domain is not verified
Email Tracking
Transactional emails automatically include:
- Open tracking - Pixel tracking to detect email opens
- Click tracking - Link wrapping for click tracking
- Unsubscribe links - Automatic unsubscribe functionality
- Email storage - All sent emails are stored for analytics
Rate Limiting
Emails are queued and sent at a controlled rate to ensure deliverability:
- Rate: 14 emails per second
- Parallelism: 10 concurrent sends
- Queue: Emails are processed through QStash for reliability
Usage Examples
Welcome Email
Perfect for onboarding new users:
{
"to": "newuser@example.com",
"subject": "Welcome to {{companyName}}!",
"content": "# Welcome {{name}}!\n\nThanks for joining us. Get started by exploring your dashboard.\n\n## Next Steps\n\n- Complete your profile\n- Explore our features\n- Join our community\n\nWe're excited to have you on board!",
"from": "welcome@yourcompany.com",
"preview": "Welcome to the platform"
}
Order Confirmation
For e-commerce order confirmations:
{
"to": "customer@example.com",
"subject": "Order Confirmation #{{orderNumber}}",
"content": "## Thanks for your order, {{name}}!\n\nYour order #{{orderNumber}} has been confirmed and will be processed shortly.\n\n### Order Details\n\n- Order Number: {{orderNumber}}\n- Total: {{orderTotal}}\n- Shipping Address: {{shippingAddress}}\n\n**Estimated Delivery:** {{deliveryDate}}\n\nIf you have any questions, please don't hesitate to contact our support team.",
"from": "orders@yourstore.com",
"replyTo": "support@yourstore.com"
}
Password Reset
For password reset notifications:
{
"to": "user@example.com",
"subject": "Password Reset Request",
"content": "Hi {{name}},\n\nYou requested a password reset for your account. Click the link below to reset your password:\n\n[Reset Password]({{resetUrl}})\n\n**This link will expire in 24 hours.**\n\nIf you didn't request this reset, please ignore this email or contact our support team if you have concerns.\n\nStay secure!",
"from": "security@yourapp.com"
}
Error Handling
Common error responses:
Invalid Email Address
{
"message": "Invalid email format"
}
Unauthorized Domain
{
"message": "Domain 'example.com' is not authorized or verified for this organization"
}
Invalid Email Format
{
"message": "Invalid from email address"
}
Validation Error
{
"message": "Validation failed",
"errors": [
{
"field": "subject",
"message": "Subject is required"
}
]
}
Related Documentation
- Variables - Personalize emails with subscriber data
- Content Deliverability Checker - Optimize emails before sending
- Email Domains Setup - Configure verified sending domains
- API Tokens - Generate API tokens for authentication
- Create Subscriber - Add subscribers to send emails to