Skip to content

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.

HeaderTypeRequiredDescription
AuthorizationstringYesBearer sk_live_YOUR_API_KEY
Idempotency-KeystringNoA unique UUIDv4 to prevent duplicate deliveries on network retries.

Request Body

Send an application/json payload with the following parameters:

ParameterTypeRequiredDescription
tostring|arrayYesThe recipient email address(es). Max 50 recipients.
fromstringYesThe sender email address. Must be a verified domain on your account (e.g., noreply@yourdomain.com).
subjectstringYesThe email subject line.
htmlstringNo*The HTML body of the email.
textstringNo*The plaintext body fallback of the email.
template_idstringNo*The ID of an email template created via the dashboard.
variablesobjectNoA JSON dictionary of variables to inject into your template_id (e.g., {"name": "Alice"}).
reply_tostringNoOptional reply-to email address.
attachmentsarrayNoAn 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.

Released under the MIT License.