Skip to main content
POST
Send Email
Send an email using raw content or a pre-built template.

Request Body

string
required
Sender email address. Must match a verified domain. Supports display name format: "Name" <email@domain.com>
string | string[]
required
Recipient email address(es). If array, all recipients see each other (single email, not batch).
string
Email subject line (max 998 characters, no newlines). Required unless using a template.
string
HTML content of the email. Required if not using templateId.
string
Plain text fallback content.
string
Template ID to use instead of raw html/text. Subject comes from template unless overridden.
object
Key-value pairs for template variable substitution ({{variable}}).
string[]
IDs of attachments to include (from the attachments upload flow).
string | string[]
CC recipients.
string | string[]
BCC recipients.
string
Reply-to email address.
object
Custom email headers to include.
string
Unique key to prevent duplicate sends. Valid for 24 hours, max 256 characters.

Content Options

You must provide content in one of two ways: Option 1: Direct Content
Option 2: Template

Examples

Response

string
Unique email ID.
string
Current status: queued, sent, delivered, bounced, or failed.
string
SMTP message ID.
string
ISO 8601 timestamp when queued.
Success Response

Test Mode Response

When using a test API key (sk_test_*), emails are simulated:
Sandbox Response
SDKs automatically extract the data field, so you access result.messageId directly.

Errors