Sendex

Emails

POST/api/v1/emailssend_only or full

Send an email

Send a single transactional email from a verified domain on your account. For sending multiple emails at once, use the batch endpoint.

Request Body

fromstringrequired

Sender address, e.g. "[email protected]". The domain must be verified on your account.

from_namestringoptional

Sender display name. Recipients see "Name <email>" instead of just the address, e.g. John <[email protected]>.

tostring | string[]required

One or more recipient addresses.

ccstring | string[]optional

CC recipients. Combined total of to + cc + bcc cannot exceed 50.

bccstring | string[]optional

BCC recipients. Addresses are hidden from other recipients.

reply_tostringoptional

Reply-To address. Replies will be directed here instead of the from address.

subjectstringrequired

Email subject line.

textstringoptional

Plain-text body. At least one of text or html is required.

htmlstringoptional

HTML body. At least one of text or html is required.

attachmentsAttachment[]optional

Array of attachment objects (see below). Max 7 MB per file, 10 MB total.

Response

idstring

Unique email ID stored in your account.

fromstring

Sender address used.

tostring[]

To recipient addresses.

ccstring[]

CC recipient addresses.

bccstring[]

BCC recipient addresses.

subjectstring

Subject line.

created_atISO 8601

Timestamp when the email was sent.

Request (curl)

curl -X POST https://sendexapi.com/api/v1/emails \
  -H "Authorization: Bearer sk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "bcc": ["[email protected]"],
    "reply_to": "[email protected]",
    "subject": "Welcome to Acme",
    "html": "<p>Thanks for signing up!</p>",
    "text": "Thanks for signing up!"
  }'

Response

HTTP/1.1 201 Created

{
  "id": "66f1a2b3c4d5e6f7a8b9c0d1",
  "from": "[email protected]",
  "to": ["[email protected]"],
  "cc": ["[email protected]"],
  "bcc": ["[email protected]"],
  "subject": "Welcome to Acme",
  "created_at": "2025-01-15T10:30:00.000Z"
}

Attachment Object

FieldTypeRequiredDescription
filenamestringrequiredFile name including extension.
contentstringrequiredBase64-encoded file content.
content_typestringrequiredMIME type, e.g. "application/pdf".
POST/api/v1/emails/batchsend_only or full

Send a batch of emails

Send up to 100 emails in a single request. Each email is sent independently — a failure in one does not affect the others. Returns HTTP 207 Multi-Status with per-email results.

Request Body

emailsEmail[]required

Array of email objects (1–100). Each object has the same fields as the single send endpoint: from, from_name, to, cc, bcc, reply_to, subject, text, html, attachments.

Response

dataResult[]

Per-email result. Successful items include all send response fields. Failed items include error and message.

totalnumber

Total number of emails submitted.

success_countnumber

Number of emails sent successfully.

error_countnumber

Number of emails that failed.

Request (curl)

curl -X POST https://sendexapi.com/api/v1/emails/batch \
  -H "Authorization: Bearer sk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      {
        "from": "[email protected]",
        "to": ["[email protected]"],
        "subject": "Hello Alice",
        "text": "Hi Alice!"
      },
      {
        "from": "[email protected]",
        "to": ["[email protected]"],
        "subject": "Hello Bob",
        "text": "Hi Bob!"
      }
    ]
  }'

Response

HTTP/1.1 207 Multi-Status

{
  "data": [
    {
      "index": 0,
      "id": "66f1a2b3c4d5e6f7a8b9c0d1",
      "from": "[email protected]",
      "to": ["[email protected]"],
      "cc": [],
      "bcc": [],
      "subject": "Hello Alice",
      "created_at": "2025-01-15T10:30:00.000Z"
    },
    {
      "index": 1,
      "error": "unprocessable_entity",
      "message": "Sending domain is not verified on your account."
    }
  ],
  "total": 2,
  "success_count": 1,
  "error_count": 1
}
GET/api/v1/emailsfull access

List emails

Returns a paginated list of emails for a domain. Requires a full-access key.

Query Parameters

domainstringrequired

The domain to list emails for.

folderinbox | sentoptional

Folder to list. Defaults to "inbox".

limitnumberoptional

Number of emails to return (1–100). Default 20.

offsetnumberoptional

Pagination offset. Default 0.

Response

dataEmail[]

Array of email summary objects.

totalnumber

Total number of emails matching the query.

limitnumber

Limit applied to the query.

offsetnumber

Offset applied to the query.

Request (curl)

curl "https://sendexapi.com/api/v1/emails?domain=example.com&folder=inbox&limit=20" \
  -H "Authorization: Bearer sk_live_XXXX"

Response

{
  "data": [
    {
      "id": "66f1a2b3c4d5e6f7a8b9c0d1",
      "from": "[email protected]",
      "to": ["[email protected]"],
      "subject": "Re: your order",
      "preview": "Your order #1234 has shipped...",
      "read": false,
      "created_at": "2025-01-15T09:00:00.000Z",
      "folder": "inbox"
    }
  ],
  "total": 142,
  "limit": 20,
  "offset": 0
}
GET/api/v1/emails/:idfull access

Retrieve an email

Retrieves the full content of an email including text body, HTML body, and attachment metadata. Requires a full-access key.

Response

idstring

Email ID.

fromstring

Sender address.

tostring[]

To recipient addresses.

ccstring[]

CC addresses.

bccstring[]

BCC addresses.

reply_tostring | null

Reply-To address, if set.

subjectstring

Subject line.

textstring

Plain-text body.

htmlstring | null

HTML body, if available.

attachmentsAttachmentMeta[]

Attachment metadata (filename, content_type, size).

readboolean

Whether the email has been read.

created_atISO 8601

Date the email was sent or received.

folderstring

"inbox" or "sent".

Request (curl)

curl "https://sendexapi.com/api/v1/emails/66f1a2b3c4d5e6f7a8b9c0d1" \
  -H "Authorization: Bearer sk_live_XXXX"

Response

{
  "id": "66f1a2b3c4d5e6f7a8b9c0d1",
  "from": "[email protected]",
  "to": ["[email protected]"],
  "cc": [],
  "subject": "Re: your order",
  "text": "Your order #1234 has shipped...",
  "html": "<p>Your order <b>#1234</b> has shipped...</p>",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "content_type": "application/pdf",
      "size": 48210
    }
  ],
  "read": true,
  "created_at": "2025-01-15T09:00:00.000Z",
  "folder": "inbox"
}
GET/api/v1/emails/:id/attachments/:filenamefull access

Get attachment

Redirects (302) to a short-lived presigned download URL for an attachment on a specific email. The URL expires after 1 hour. Requires a full-access key.

Response

302 redirect

Redirects to a presigned S3 URL. Follow redirects in your HTTP client to receive the file.

Request (curl)

curl -L "https://sendexapi.com/api/v1/emails/66f1a2b3c4d5e6f7a8b9c0d1/attachments/invoice.pdf" \
  -H "Authorization: Bearer sk_live_XXXX" \
  -o invoice.pdf

Response

HTTP/1.1 302 Found
Location: https://s3.amazonaws.com/...presigned-url...

# -L flag follows the redirect and downloads the file