Send Email

Send a single transactional email

POST/v1/send/emails/send

Queue a single email for delivery. Returns immediately with a message ID.

Requires:send:write

Request Body

Body Parameters

fromobjectrequired
Sender information
tostring | string[]required
Recipient email address(es)
ccstring[]
CC recipients
bccstring[]
BCC recipients
subjectstringrequired
Email subject line (max 500 characters)
textstring
Plain text body
htmlstring
HTML body
templateIdstring
Template ID to use instead of inline content
templateDataobject
Variables for template rendering (required if templateId is set)
metadataobject
Custom metadata key-value pairs
tagsstring[]
Tags for categorization
prioritystring
Delivery priorityDefaults to normal
highnormallow
attachmentsobject[]
File attachments

You must provide either text, html, or templateId. If using templateId, you must also provide templateData.

Send an email
curl -X POST "https://api.do.dev/v1/send/emails/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "from": { "email": "hello@example.com", "name": "My App" },
  "to": "user@example.com",
  "subject": "Welcome!",
  "html": "<h1>Welcome to our platform</h1><p>Thanks for signing up.</p>"
}'
Response202
{
"id": "msg_abc123def456",
"status": "queued",
"message": "Email queued for delivery"
}

Error Responses

{
"error": "validation_error",
"message": "Missing required field: subject"
}