Send Email
POST /api/e2/emails
Send an email immediately or schedule it for later delivery.
Request Parameters
Sender email address. Must be from a verified domain.Example:
"[email protected]" or "John Doe <[email protected]>"Recipient email address(es). Can be a single string or array.Example:
"[email protected]" or ["[email protected]", "[email protected]"]Email subject line.
HTML content of the email. Either
html or text must be provided.Plain text content of the email. Either
html or text must be provided.CC recipients. Can be a single string or array.
BCC recipients. Can be a single string or array.
Reply-To addresses. Can be a single string or array.
Custom email headers as key-value pairs.Example:
{ "X-Custom-Header": "value" }Array of attachment objects.
Array of tag objects for categorizing and tracking emails.
ISO 8601 date string or natural language for scheduling (e.g.,
"tomorrow at 9am", "2024-12-25T10:00:00Z").When provided, the email will be scheduled instead of sent immediately.Timezone for natural language parsing (e.g.,
"America/New_York", "UTC").Default: "UTC"Response
Unique identifier for the email.
RFC 2822 Message-ID assigned by the mail server (only for sent emails).
ISO 8601 timestamp when the email is scheduled to be sent (only for scheduled emails).
Email status:
"sent" or "scheduled".Timezone used for scheduling (only for scheduled emails).
List Emails
GET /api/e2/emails
List all email activity (sent, received, and scheduled) with comprehensive filtering options.
Query Parameters
Filter by email type:
all, sent, received, or scheduled.Filter by status:
all, delivered, pending, failed, bounced, scheduled, cancelled, unread, read, or archived.Note: unread, read, and archived only apply to received emails.Filter by time range:
1h, 24h, 7d, 30d, 90d, or all.Search query to filter emails by subject, sender, or recipient. Case-insensitive partial match.
Filter by domain. Accepts domain ID (e.g.,
dom_xxx) or domain name (e.g., example.com).Filter by email address. Accepts address ID (e.g.,
addr_xxx) or raw email address.Maximum number of emails to return (1-100).
Number of emails to skip for pagination.
Response
Array of email objects matching the query.
Pagination metadata.
Applied filters for this query.
Get Email
GET /api/e2/emails/:id
Retrieve a single email by ID. Works for sent, received, and scheduled emails.
Response
Object type:
"email".Unique identifier for the email.
Email type:
sent, received, or scheduled.Sender email address.
Array of recipient email addresses.
Array of CC recipient email addresses.
Array of BCC recipient email addresses.
Array of Reply-To addresses.
Email subject line.
HTML content of the email.
Plain text content of the email.
Current status:
delivered, pending, failed, bounced, scheduled, or cancelled.ISO 8601 timestamp when the email was created/received.
ISO 8601 timestamp when the email was sent.
ISO 8601 timestamp when the email is scheduled to be sent.
Whether the email has any attachments.
Array of attachment metadata objects.
Whether the email has been read (only for received emails).
ID of the thread this email belongs to.
Position in the thread (0 = first message).
Email headers as key-value pairs.
Array of tag objects (only for sent emails).
Reply to Email
POST /api/e2/emails/:id/reply
Reply to an email or thread. Accepts either an email ID or thread ID (replies to latest message in thread).
Request Parameters
Sender email address. Must be from a verified domain.
Recipient email address(es). Defaults to original sender if not provided.
Email subject. Defaults to
Re: [original subject] if not provided.HTML content of the reply. Either
html or text must be provided.Plain text content of the reply. Either
html or text must be provided.Custom email headers as key-value pairs.
Array of attachment objects.
Include original CC recipients. Default:
false.Array of tag objects for categorizing the reply.
Response
Unique identifier for the reply email.
RFC 2822 Message-ID of the reply.
AWS SES message ID.
ID of the email being replied to.
ID of the thread this reply belongs to.
Whether the ID provided was a thread ID.
Retry Email Delivery
POST /api/e2/emails/:id/retry
Retry delivery of a received email. Can retry to a specific endpoint, retry a specific failed delivery, or retry to all configured endpoints.
Request Parameters
Endpoint ID to retry delivery to. If not provided, retries to all configured endpoints.
Specific delivery ID to retry. If provided, retries that specific delivery.
Response
Whether the retry was successful.
Human-readable message about the retry result.
ID of the delivery that was retried.
Update Email
PATCH /api/e2/emails/:id
Update metadata for a received email. Supports marking emails as read/unread and archived/unarchived.
Request Parameters
Mark email as read or unread.
Mark email as archived or unarchived.
Response
Object type:
"email".Unique identifier for the email.
Whether the email is marked as read.
Whether the email is archived.
ISO 8601 timestamp of when the email was last updated.
Cancel Scheduled Email
DELETE /api/e2/emails/:id
Cancel a scheduled email by ID. Only works for emails that haven’t been sent yet.
Response
Whether the cancellation was successful.
Human-readable message about the cancellation result.
ID of the cancelled email.