Features
Emails
Send, schedule, and track emails
Overview
Send emails via SMTP relay or the built-in mail server. The emails API supports both immediate delivery and scheduled sending, with optional template rendering and file attachments. Every email is tracked for opens and clicks automatically.
Send Email
Send a single email immediately or schedule it for later delivery. You can provide raw HTML content or reference a saved template by ID.
/api/emailsSend an email immediately or schedule it for later delivery.
Parameters
| Name | Type | Description |
|---|---|---|
to_email* | string | Recipient email address |
to_name* | string | Recipient display name |
from_email* | string | Sender email address |
subject* | string | Email subject line |
html_body* | string | HTML content of the email |
text_body | string | Plain text fallback content |
template_id | number | ID of a saved template to render |
scheduled_at | string | ISO 8601 datetime to schedule delivery |
Request
{
"to_email": "jane@example.com",
"to_name": "Jane Doe",
"from_email": "hello@yourapp.com",
"subject": "Welcome aboard!",
"html_body": "<h1>Welcome</h1><p>Thanks for signing up.</p>",
"text_body": "Welcome! Thanks for signing up.",
"scheduled_at": "2026-03-10T09:00:00Z"
}Response
{
"message_id": "msg_abc123def456",
"status": "scheduled"
}Cancel Scheduled
Cancel a previously scheduled email before it is sent. This only works for emails that have not yet been delivered.
/api/emails/cancelCancel a scheduled email that has not yet been sent.
Parameters
| Name | Type | Description |
|---|---|---|
email_id* | string | ID of the scheduled email to cancel |
Request
{
"email_id": "msg_abc123def456"
}Response
{
"success": true,
"message": "Scheduled email cancelled"
}Email Tracking
Every email sent through the platform is automatically tracked for engagement. Open tracking is implemented via a transparent tracking pixel embedded in the HTML body. Click tracking works by rewriting links to pass through a redirect endpoint that logs the event before forwarding to the original URL.
All tracking events are logged to the email_events table with the event type, timestamp, and associated email ID. Supported event types include open, click, and deliver.
Upload Attachments
Upload files to include as inline images or attachments in your emails. Files are uploaded as multipart form data and the response returns a URL you can reference in your email HTML.
/api/uploadUpload a file via multipart form data. Returns a URL for use in email content.
Parameters
| Name | Type | Description |
|---|---|---|
file* | File | The file to upload (multipart form data) |
Response
{
"url": "https://yourapp.com/uploads/image_abc123.png",
"filename": "image_abc123.png",
"size": 24576
}