Mail API

API Documentation

Integrate email capabilities into your application with our simple and powerful REST API.

Authentication

The API uses Bearer Token authentication. You must include your API token in the Authorization header of each request.

Header Format
Authorization: Bearer <YOUR_API_TOKEN>

You can generate and manage your API tokens in the Settings page.

Send Email

POST
/api/send

Send a transactional email. Supports plain text, HTML, and scheduling.

Request Body
Content-Type: application/json
ParameterTypeRequiredDescription
fromstringNoSender email address. Defaults to SMTP user if omitted.
fromNamestringNoDisplay name for the sender (e.g., "My Company").
tostring | string[]
Yes
Recipient email address(es). Can be a string or array of strings.
bulkbooleanNoIf true (default), sends one email to all recipients. If false, sends individual emails to each recipient.
subjectstring
Yes
Email subject line.
textstringNoPlain text version of the email. Recommended for deliverability.
htmlstringNoHTML version of the email.
ccstring | string[]NoCC recipient(s).
bccstring | string[]NoBCC recipient(s).
replyTostringNoReply-To address.
scheduledAtstringNoISO 8601 date string to schedule the email for future delivery.
smtpUserstringNoSpecific SMTP configuration username to use (if you have multiple).

Examples

curl -X POST https://your-domain.com/api/send \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["user@example.com", "other@example.com"],
    "fromName": "My Company",
    "subject": "Hello World",
    "text": "This is a test email.",
    "bulk": true
  }'

Response

{
  "ok": true,
  "messageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "status": "queued"
}

Errors

The API uses standard HTTP status codes to indicate success or failure.

CodeDescription
200Success. The email was queued or sent.
400Bad Request. Missing required fields or invalid data.
401Unauthorized. Invalid or missing API token.
500Internal Server Error. Something went wrong on our end.