NitroMail API

NitroMail sends transactional emails (verification codes, password resets, receipts, notifications) from your own verified domain. You can send with the HTTP API or with SMTP; both go through the same checks and the same pricing. Marketing and bulk emails are not allowed.

Before you send, in the NitroMail panel: confirm your account email, add and verify your domain (DNS), create a sending address, and create an API key or SMTP credentials. Each sent email is charged from your balance; you only pay for what you send.

Authentication

Send your API key in the Authorization header of every request. Create keys under API Keys in the panel; a key is shown only once. Never put an API key in browser or mobile app code.

Authorization: Bearer nm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Send an email

POST https://api.nitromail.io/v1/messages with a JSON body.

curl https://api.nitromail.io/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "from_name": "Your Shop",
    "to": "[email protected]",
    "subject": "Your order #1234",
    "html": "<p>Thanks for your order!</p>",
    "text": "Thanks for your order!"
  }'

Request fields

FieldRequiredDescription
fromyesOne of your active sending addresses on a verified domain.
from_namenoDisplay name of the sender (max 200 characters).
toyes A recipient as "[email protected]" or {"email": "[email protected]", "name": "Ann"}, or a list of up to 50 of them. Every recipient receives a separate email and is charged separately.
reply_tonoReply-To address.
subjectyesMax 998 characters, no line breaks.
htmlone ofHTML version.
textone ofPlain-text version. Sending both improves deliverability. Max 1 MB together.
headersno Up to 10 custom headers: X-* headers and List-Unsubscribe / List-Unsubscribe-Post.

Attachments, cc and bcc are not supported. Need attachments? Please contact support. Tip: link to the file (for example an invoice download page) instead of attaching it.

Response

The response lists every recipient with its own result. charged_usd is the total deducted from your balance for this request.

{
  "success": true,
  "messages": [
    { "to": "[email protected]", "id": "em_3f9c2a1b7d4e5f60a1b2c3d4", "status": "queued" }
  ],
  "charged_usd": "0.002000"
}

Follow every email, its delivery timeline and its cost under Messages and Transactions in the panel.

Errors

When the whole request fails, nothing is sent or charged:

{
  "success": false,
  "error": { "type": "invalid_request", "message": "subject is required.", "field": "subject" }
}
HTTPtypeMeaning
400invalid_jsonThe body is not a JSON object.
401unauthorizedMissing, wrong or revoked API key.
403account_suspended, email_not_verifiedThe account cannot send.
413payload_too_largeThe request or the content is too large.
422invalid_requestA field is invalid; see field. Also when no recipient was accepted.
429rate_limitedA sending limit was reached; retry later.
500internal_errorTemporary problem; retry with backoff.

Limits

New accounts start with low limits that grow automatically with a good sending history (low bounce rate, no policy violations): emails per day, emails per minute and new recipients per day (addresses you have never emailed before). The same email to the same recipient is limited to 3 per hour, and any email to one recipient to 20 per hour and 100 per day. Unusual volume is paused for a manual review. Need higher limits? Contact support.

SMTP

Hostsmtp.nitromail.io
Port 465SSL/TLS (implicit TLS)
Port 587STARTTLS (required before login)
AuthenticationPLAIN or LOGIN with the SMTP credentials from the panel (not your account password)
LimitsMax 50 recipients and 2 MB per message; no attachments

The From header must be one of your sending addresses. Every envelope recipient (RCPT TO) receives a separate email. Replies:

Message statuses

After sending, the status in the panel follows the delivery: queued → delivered, or delayed (temporary, retried), bounced (the recipient server refused it; the address is added to your suppression list), suppressed or canceled. Delivery results do not change the price: an email is charged when it is handed to our mail servers. Keep your bounce rate low: accounts with a high bounce rate are paused.