---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/api-reference/email/batch

Email

# Send Batch Emails

Send the same email to multiple recipients in a single API call by passing an array to the `to` field. Up to 50 addresses per call. Each recipient receives an individual email, and addresses are not visible to each other.

POST `https://mail.sendcorex.com/v3.0/send`

The `recipients` field in the response confirms how many addresses were accepted. Invalid addresses in the array are skipped and reported in `skipped`.

## Body parameters

- `to` string[] required
Array of recipient email addresses. Maximum 50 per call.
e.g. `["alice@x.com", "bob@x.com", "carol@x.com"]`

All other parameters are identical to [Send Email](https://docs.sendcorex.com/api-reference/email/send) .

## Quick start

```
import axios from 'axios';

const response = await axios.post(
  'https://mail.sendcorex.com/v3.0/send',
  {
    to: [
      'alice@example.com',
      'bob@example.com',
      'carol@example.com',
    ],
    from: 'noreply@yourdomain.com',
    senderName: 'My App',
    subject: 'Important update for all users',
    body: '<p>Here is your update...</p>',
  },
  { headers: { Authorization: process.env.SENDCOREX_API_KEY } }
);

const { id, ids, recipients, skipped } = response.data;
console.log('Sent to ' + recipients + ' recipients');

// Invalid addresses are skipped and reported in "skipped"
if (skipped) console.log('Skipped:', skipped);
```

## Response

```
{
  "success": true,
  "message": "Email queued successfully",
  "code": "EMAIL_QUEUED_SUCCESS",
  "id": "a898cf59-4b4e-4547-ad60-c0f818dae7fd",
  "ids": [
    { "id": "a898cf59-4b4e-4547-ad60-c0f818dae7fd", "recipient": "foo@x.com" },
    { "id": "76627061-ab16-4bba-bcfc-ca7ff92ac251", "recipient": "bar@x.com" }
  ],
  "recipients": 2,
  "scheduledAt": null
}
```

## Errors

[All error codes →](https://docs.sendcorex.com/api-reference/errors)

Errors return a JSON object with `error` and `code`.

- 401`MISSING_AUTH_HEADER`
No Authorization header present.
- 401`INVALID_API_KEY`
The API key is invalid or revoked.
- 401`ACCOUNT_BLOCKED`
Account has been blocked.
- 401`NO_CREDITS_LEFT`
Not enough email credits for every recipient. Each to, cc and bcc address uses 1 credit.
- 401`DOMAIN_NOT_VALIDATED`
Sender domain not verified.
- 401`LISTED_SPAM_HAUS`
Sender domain is listed on Spamhaus.
- 401`ISP_DOMAIN_BLOCKED`
Sending from well-known domains (gmail.com, outlook.com, etc) is not allowed.
- 401`FROM_HEADER_DOMAIN_MISMATCH`
From header domain not authorized for this sender.
- 401`USER_NOT_FOUND`
User not found.
- 401`MISSING_USER_PRIVILEGES`
Missing user privileges.
- 401`EMAIL_CREDITS_NOT_FOUND`
Error fetching email credits.
- 401`EMAIL_NOT_VALIDATED`
Account email address has not been verified yet.
- 429`CREDENTIAL_TEMPORARILY_BLOCKED`
API key temporarily blocked due to repeated policy violations.
- 429`IP_TEMPORARILY_BLOCKED`
Requesting IP temporarily blocked due to repeated policy violations.
- 429`TOO_MANY_CONCURRENT_CONNECTIONS`
Too many concurrent requests from this IP. Try again shortly.
- 400`INVALID_JSON`
The request body is not valid JSON.
- 400`MISSING_FROM`
The from field is missing or empty.
- 400`INVALID_FROM_FORMAT`
The from field must be a valid email address.
- 400`MISSING_SENDERNAME`
The senderName field is missing or empty.
- 400`INVALID_SENDERNAME_FORMAT`
The senderName field contains invalid characters.
- 400`MISSING_SUBJECT`
The subject field is missing or empty.
- 400`MISSING_BODY`
The body field is missing or empty.
- 400`MISSING_TOADDRESS`
The to field is missing or empty.
- 400`MISSING_TO`
The to field is missing or empty.
- 400`INVALID_TOADDRESS`
One or more recipient addresses are malformed.
- 400`TOADDRESS_LIMIT_EXCEEDED`
More than 50 recipients in the to array.
- 400`INVALID_CCADDRESS`
One or more cc addresses are malformed.
- 400`INVALID_BCCADDRESS`
One or more bcc addresses are malformed.
- 400`RECIPIENT_LIMIT_EXCEEDED`
to, cc and bcc together have more than 50 unique recipients.
- 400`INVALID_SCHEDULED_AT`
scheduled_at is not a valid date or is in the past.
- 400`INVALID_SENDER_FORMAT`
The sender email format is invalid.
- 400`HEADER_NOT_ALLOWED`
Custom header key is not on the allowed list (List-Unsubscribe, List-Id, X-*, etc).
- 400`INVALID_HEADER_VALUE`
Header value contains invalid characters (CR/LF not allowed).
- 400`DANGEROUS_ATTACHMENT`
One or more attachments were blocked for security reasons.
- 400`INVALID_ATTACHMENT`
An attachment content is not valid base64.
- 400`MISSING_UNSUBSCRIBE_PLACEHOLDER`
unsubscribe is true but the body has no unsubscribe placeholder ([unsubscribe_url], [unsubscribe], [unsub_url] or [opt_out_url]).
- 403`ACCOUNT_RESTRICTED`
Account is temporarily restricted.
- 403`DAILY_LIMIT`
Daily email sending limit reached.
- 403`MARKETING_LIMIT_REACHED`
Free plan daily marketing limit reached: 30 marketing or cold outreach emails per day, counted per recipient over a rolling 24-hour window. The response includes limit, used, recipients and upgradeUrl. Transactional emails still go out; nothing is queued.
- 403`FORBIDDEN_HTML_CONTENT`
The HTML contains active content not allowed in emails (script, iframe, form, input, button, embed, object, svg, on* handlers, javascript: links, meta refresh…). The response lists the findings. Use a styled <a> instead of buttons or forms.
- 403`SPAM_DETECTED`
Email content flagged as spam. Response includes quarantine_id and release instructions.
- 403`SENDER_NAME_MISMATCH`
Multiple sender names detected for same address.
- 403`FOLLOWUP_PATTERN_DETECTED`
Email content flagged as repeated suspicious follow-up pattern.
- 403`SCAM_PATTERN_DETECTED`
Email content flagged as scam pattern.
- 403`ACCOUNT_SUSPENDED_SPOOFING`
Account suspended due to repeated From header spoofing attempts.
- 400`INVALID_IDEMPOTENCY_KEY`
The Idempotency-Key header is invalid. Use 1–255 characters: letters, numbers, _ - : .
- 409`IDEMPOTENCY_IN_PROGRESS`
A request with the same Idempotency-Key is still being processed. Wait (Retry-After: 1) and retry with the same key.
- 422`RECIPIENT_UNSUBSCRIBED`
Sent with unsubscribe enabled (unsubscribe: true) to someone who already unsubscribed through the Sendcorex link. The whole request is refused and the unsubscribed array lists them. This person unsubscribed from you: remove them and send again, and do not send to them again.
- 422`IDEMPOTENCY_KEY_REUSED`
This Idempotency-Key was already used with a different body. Use a new key for every new email.
- 500`INTERNAL_SERVER_ERROR`
Unexpected server error. Try again.
- 500`PARSE_ERROR`
Failed to process email content (MIME parse failure).
- 500`PERSIST_FAILED`
Failed to queue email (database persistence failure).
- 503`AUTH_UNAVAILABLE`
Could not validate the API key right now. Try again.
- 503`UNSUBSCRIBE_UNAVAILABLE`
Unsubscribe link service temporarily unavailable. Try again later.
