Send Email
POST /v1/email/send
Dispatches a highly deliverable transactional email. SendAPI utilizes dedicated IP pools to ensure your mission-critical password resets, receipts, and alert emails do not land in the spam folder.
Authentication
All requests to this endpoint must include your API key in the Authorization header as a Bearer token.
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer sk_live_YOUR_API_KEY |
Idempotency-Key | string | No | A unique UUIDv4 to prevent duplicate deliveries on network retries. |
Request Body
Send an application/json payload with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string|array | Yes | The recipient email address(es). Max 50 recipients. |
from | string | Yes | The sender email address. Must be a verified domain on your account (e.g., noreply@yourdomain.com). |
subject | string | Yes | The email subject line. |
html | string | No* | The HTML body of the email. |
text | string | No* | The plaintext body fallback of the email. |
template_id | string | No* | The ID of an email template created via the dashboard. |
variables | object | No | A JSON dictionary of variables to inject into your template_id (e.g., {"name": "Alice"}). |
reply_to | string | No | Optional reply-to email address. |
attachments | array | No | An array of attachment objects (filename, content base64, content_type). |
*Note: You must provide either html, text, or template_id.
Example Request
bash
curl -X POST https://api.sendapi.co/v1/email/send \
-H "Authorization: Bearer sk_live_123456789" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"from": "Acme Corp <hello@acme.com>",
"subject": "Welcome to Acme Corp!",
"html": "<strong>Thanks for signing up.</strong> Let us know if you have any questions."
}'javascript
import { SendAPI } from '@sendapi/node';
const client = new SendAPI('sk_live_123456789');
const response = await client.email.send({
to: 'alice@example.com',
from: 'Acme Corp <hello@acme.com>',
subject: 'Welcome to Acme Corp!',
template_id: 'tpl_01H8xyz',
variables: {
first_name: 'Alice',
login_url: 'https://acme.com/login'
}
});Response
Returns an Email object indicating that the payload has been accepted for delivery.
json
{
"id": "eml_01H8BKF...Z2T",
"object": "email.message",
"status": "queued",
"to": ["alice@example.com"],
"from": "Acme Corp <hello@acme.com>",
"created_at": "2026-03-09T14:30:00Z"
}Tracking & Analysis
By default, SendAPI automatically tracks physical deliveries, opens, clicks, and bounces. You can receive these events in real-time by registering an endpoint on the Webhooks page.