The Send.dev Email API allows you to send transactional and marketing emails with high deliverability. This page covers all aspects of sending emails.

Send an Email

POST/v1/emailsRequires API Key

Send a single email

Basic Request

curl -X POST https://api.send.dev/v1/emails \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@mail.yourdomain.com",
    "to": "user@example.com",
    "subject": "Welcome to our platform",
    "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    "text": "Welcome! Thanks for signing up."
  }'
200Email queued successfully
{
"id": "email_01HXYZ123456789",
"status": "queued",
"from": "hello@mail.yourdomain.com",
"to": "user@example.com",
"subject": "Welcome to our platform",
"created_at": "2025-01-13T10:30:00Z"
}

Request Parameters

Body Parameters

NameTypeRequiredDescription
fromstringrequiredSender email address. Must be from a verified domain.
tostring | string[]requiredRecipient email address(es). Max 50 recipients.
subjectstringrequiredEmail subject line. Max 998 characters.
htmlstringoptionalHTML content of the email. Either html or text is required.
textstringoptionalPlain text content of the email. Either html or text is required.
ccstring | string[]optionalCC recipients. Max 50 addresses.
bccstring | string[]optionalBCC recipients. Max 50 addresses.
reply_tostringoptionalReply-to address for recipient responses.
attachmentsAttachment[]optionalFile attachments. See Attachments section.
headersobjectoptionalCustom email headers.
tagsstring[]optionalTags for categorizing and filtering emails.
metadataobjectoptionalCustom metadata stored with the email.
track_opensbooleanoptionalEnable open tracking. Default: true(default: true)
track_clicksbooleanoptionalEnable click tracking. Default: true(default: true)

Advanced Examples

Multiple Recipients

Send to multiple recipients in one API call:

curl -X POST https://api.send.dev/v1/emails \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "team@mail.yourdomain.com",
    "to": ["alice@example.com", "bob@example.com"],
    "cc": ["manager@example.com"],
    "bcc": ["archive@yourdomain.com"],
    "subject": "Project Update",
    "html": "<p>Here is the latest project update...</p>"
  }'

Recipient Limits

Each email can have up to 50 recipients across to, cc, and bcc combined. For larger sends, use batch sending.

Personalized Sender Name

Include a display name with the sender address:

{
  "from": "Alex from Acme <alex@mail.acme.com>",
  "to": "customer@example.com",
  "subject": "Your order has shipped"
}

Reply-To Address

Set a different reply-to address:

{
  "from": "noreply@mail.yourdomain.com",
  "reply_to": "support@yourdomain.com",
  "to": "customer@example.com",
  "subject": "Your receipt"
}

Custom Headers

Add custom email headers for tracking or routing:

{
  "from": "notifications@mail.yourdomain.com",
  "to": "user@example.com",
  "subject": "Account Alert",
  "html": "<p>Your password was changed.</p>",
  "headers": {
    "X-Entity-Ref-ID": "user_12345",
    "X-Priority": "1",
    "List-Unsubscribe": "<mailto:unsubscribe@yourdomain.com>"
  }
}

Tags and Metadata

Add tags for filtering and metadata for your records:

{
  "from": "billing@mail.yourdomain.com",
  "to": "customer@example.com",
  "subject": "Invoice #12345",
  "html": "<p>Your invoice is attached.</p>",
  "tags": ["billing", "invoice", "q1-2025"],
  "metadata": {
    "invoice_id": "inv_12345",
    "customer_id": "cust_67890",
    "amount": "99.99"
  }
}

Batch Sending

POST/v1/emails/batchRequires API Key

Send multiple emails in a single request

For high-volume sending, use the batch endpoint:

curl -X POST https://api.send.dev/v1/emails/batch \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      {
        "from": "newsletter@mail.yourdomain.com",
        "to": "alice@example.com",
        "subject": "Weekly Digest",
        "html": "<p>Hello Alice, here is your digest...</p>"
      },
      {
        "from": "newsletter@mail.yourdomain.com",
        "to": "bob@example.com",
        "subject": "Weekly Digest",
        "html": "<p>Hello Bob, here is your digest...</p>"
      }
    ]
  }'
200Batch queued
{
"batch_id": "batch_01HXYZ123456789",
"total": 2,
"queued": 2,
"failed": 0,
"emails": [
  { "id": "email_01HXYZ111111111", "status": "queued", "to": "alice@example.com" },
  { "id": "email_01HXYZ222222222", "status": "queued", "to": "bob@example.com" }
]
}

Batch Limits

Each batch request can contain up to 100 emails. For larger volumes, make multiple batch requests.

Retrieve Email Status

GET/v1/emails/:idRequires API Key

Get details and status of a sent email

curl https://api.send.dev/v1/emails/email_01HXYZ123456789 \
  -H "Authorization: Bearer sk_live_your_api_key"
200Email details
{
"id": "email_01HXYZ123456789",
"status": "delivered",
"from": "hello@mail.yourdomain.com",
"to": "user@example.com",
"subject": "Welcome to our platform",
"created_at": "2025-01-13T10:30:00Z",
"sent_at": "2025-01-13T10:30:01Z",
"delivered_at": "2025-01-13T10:30:03Z",
"opened_at": "2025-01-13T10:35:00Z",
"opened_count": 2,
"clicked_at": "2025-01-13T10:36:00Z",
"clicked_count": 1,
"clicks": [
  { "url": "https://yourdomain.com/welcome", "count": 1, "first_at": "2025-01-13T10:36:00Z" }
],
"tags": ["welcome"],
"metadata": { "user_id": "user_12345" }
}

Email Statuses

StatusDescription
queuedEmail accepted and waiting to be sent
sendingEmail is being sent to the mail server
sentEmail handed off to the receiving server
deliveredEmail confirmed delivered to inbox
bouncedEmail bounced (hard or soft bounce)
complainedRecipient marked as spam
failedEmail failed to send (see error)

List Emails

GET/v1/emailsRequires API Key

List sent emails with filtering

curl "https://api.send.dev/v1/emails?status=delivered&limit=20" \
  -H "Authorization: Bearer sk_live_your_api_key"

Query Parameters

Query Parameters

NameTypeRequiredDescription
statusstringoptionalFilter by status: queued, sent, delivered, bounced, complained, failed
tostringoptionalFilter by recipient email address
fromstringoptionalFilter by sender email address
tagstringoptionalFilter by tag
created_afterstringoptionalFilter emails created after this ISO timestamp
created_beforestringoptionalFilter emails created before this ISO timestamp
limitintegeroptionalNumber of results (1-100)(default: 20)
cursorstringoptionalPagination cursor from previous response

Error Handling

Validation Errors

{
  "error": {
    "code": "validation_error",
    "message": "Invalid request body",
    "details": [
      { "field": "to", "message": "Invalid email address format" },
      { "field": "subject", "message": "Subject is required" }
    ]
  }
}

Domain Not Verified

{
  "error": {
    "code": "domain_not_verified",
    "message": "Domain 'mail.example.com' is not verified",
    "docs_url": "https://send.dev/docs/email/domains"
  }
}

Rate Limited

{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded. Retry after 60 seconds.",
    "retry_after": 60
  }
}

Best Practices

  1. Always include plain text - Some email clients only display plain text
  2. Use a consistent sender - Maintain sender reputation
  3. Include unsubscribe links - Required for marketing emails (CAN-SPAM)
  4. Handle bounces - Remove bounced addresses from your lists
  5. Use tags - Make it easy to filter and analyze emails
  6. Store metadata - Link emails to your internal records
  7. Monitor deliverability - Check your dashboard regularly

SDK Examples

Send emails and check status using your preferred language:

# Send an email
curl -X POST https://api.send.dev/v1/emails \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
  "from": "hello@mail.yourdomain.com",
  "to": "user@example.com",
  "subject": "Welcome!",
  "html": "<h1>Welcome to our platform!</h1>",
  "text": "Welcome to our platform!",
  "tags": ["welcome", "onboarding"],
  "metadata": {"user_id": "user_123"}
}'

# Check email status
curl https://api.send.dev/v1/emails/email_01HXYZ123456789 \
-H "Authorization: Bearer sk_live_your_api_key"

On this page