REST API Reference

Email Send REST API

Send transactional and marketing emails via a simple JSON REST API.

Docs Summary

  • What this page explains: How to send emails programmatically using MailSend's JSON REST API endpoint.
  • Who should use it: Developers integrating automated email triggers into web apps.
  • Related MailSend feature: REST API sending, SDKs
  • Common use cases: OTPs, alerts, password resets, order confirmations
  • Related docs: SDK Reference, Webhooks, Domain Setup

The MailSend REST API allows sending beautiful, high-speed emails from your backend or serverless edge routes. Authenticate by passing your Bearer API key in the request headers.

API Endpoint

POST `https://api.mailsend.dev/v1/emails`

Example cURL Requestbash
curl --location 'https://api.mailsend.dev/v1/emails' \
  --header 'Authorization: Bearer ms_live_abc123XYZ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "from": "David <[email protected]>",
    "to": ["[email protected]"],
    "subject": "Welcome to MailSend 🎉",
    "html": "<strong>Welcome to the platform!</strong>"
  }'

Request Parameters

Specify these JSON parameters in your request body:

FieldTypeRequiredDescription
fromstringYesThe verified sending email address (e.g. [email protected] or Name <[email protected]>).
tostring[]YesList of recipient email addresses. Maximum 50 per batch request.
subjectstringYesThe subject line of the email.
htmlstringNoHTML body of the email. Supports inline CSS styling.
textstringNoPlain text alternative body of the email.
reply_tostringNoReply-to address for emails.
headersobjectNoCustom headers to attach to the SMTP transaction.