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.
Sending to an address that is not already present creates a
TRANSACTIONALcontact unless Settings → Configuration → Add transactional recipients to the marketing list is on. This endpoint is not a supported custom double-opt-in state machine; read GDPR in Lumail before using it for confirmation emails.
Lumail is API-first. For systems that support HTTP email hooks, call this endpoint from your hook handler. For tools that only support SMTP, use the Lumail SMTP endpoint, which accepts SMTP messages and queues them through the same transactional priority lane as this API.
For Supabase Auth email OTPs or magic links, use Supabase's Send Email hook when available. If the source can only use SMTP, follow the SMTP transactional email tutorial and configure smtp.lumail.io as the custom SMTP provider.
This endpoint, the SDK emails.send() method, the CLI emails send command, and the MCP/AI send_email tool use a dedicated QStash priority lane. Campaign and newsletter batches use a separate bulk lane, so a large newsletter send does not place OTP, password reset, or manually triggered transactional emails behind the campaign backlog.
The send is still asynchronous: a successful response means Lumail accepted and queued the email. End-to-end delivery depends on downstream provider and recipient mailbox behavior, but priority emails are dispatched through the priority lane as soon as priority-lane capacity is available.
| 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: (default), , or |
MARKDOWNHTMLTIPTAPpreview | 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) |
tracking | object | No | Tracking options (see below) |
| Field | Type | Default | Description |
|---|---|---|---|
tracking.links | boolean | true | Enable link tracking (wraps links with tracking URLs) |
tracking.open | boolean | true | Enable open tracking (adds invisible pixel to detect email opens) |
Set tracking.links: false to keep original URLs without shortening or tracking. This is useful for transactional emails where you don't want links like https://example.com/reset to become https://lumail.io/l/abc123.
Open and click tracking can process personal data. For confirmation, authentication, and other necessary messages where tracking is not required, explicitly set both options to false.
When to does not match an existing subscriber, Lumail creates one before queuing the email:
TRANSACTIONAL (not marketing-eligible, still receives transactional mail).SUBSCRIBED. Double opt-in is ignored.BANNED, BOUNCED, COMPLAINED) are rejected.The transactional API does not generate or expose the native Lumail confirmation token. Adding a tag after your own confirmation does not change Lumail's subscription status or populate confirmedAt and confirmationIp. Use the Subscribers API with Lumail's native double opt-in for the supported confirmation lifecycle, or manage consent and marketing eligibility entirely in your own system.
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
message | string | Success message |
id | string | Email ID (eml_…) used after the send is persisted |
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:
The content field uses Markdown format. You can include various elements:
Hello {{name}}, this is a basic email.This is **bold text** and this is _italic text_.# Welcome {{name}}!
## Benefits
- First benefit
- Second benefit
- Third benefit
### Getting Started
1. Step one
2. Step two
3. Step threeVisit our [website](https://example.com) for more information.
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 subscriberThe from email address domain must be verified in your account. The API will:
from email addressTransactional emails automatically include:
Emails are queued and sent at a controlled rate to ensure deliverability:
Perfect for onboarding new users:
{
"to": "[email protected]",
"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": "[email protected]",
"preview": "Welcome to the platform"
}For e-commerce order confirmations:
{
"to": "[email protected]",
"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": "[email protected]",
"replyTo": "[email protected]"
}For password reset notifications:
{
"to": "[email protected]",
"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": "[email protected]"
}Common error responses:
{
"message": "Invalid email format"
}{
"message": "Domain 'example.com' is not authorized or verified for this organization"
}{
"message": "Invalid from email address"
}{
"message": "Validation failed",
"errors": [
{
"field": "subject",
"message": "Subject is required"
}
]
}