DocumentationSend email

Send email

POST /emails/send — payload, response, and templates.

Main transactional send endpoint.

POST https://api.mailingcore.com/emails/send
Authorization: Bearer mc_live_xxxx
X-Tenant-Id: clxxxxxxxx
Content-Type: application/json

Required scope: email:send.

Request body

{
  "to": "[email protected]",
  "subject": "Welcome to MailingCore",
  "htmlBody": "<h1>Hello</h1><p>Thanks for signing up.</p>",
  "textBody": "Hello. Thanks for signing up.",
  "fromEmail": "[email protected]",
  "fromName": "Your App",
  "replyTo": "[email protected]",
  "tags": ["welcome"],
  "metadata": { "userId": "123" },
  "idempotencyKey": "welcome-123-v1",
  "templateVersionId": "clxversion...",
  "projectId": "clxproject...",
  "unsubscribeLang": "en"
}

Fields

FieldRequiredDescription
toYesRecipient email
subjectYesSubject line (max 998 characters)
htmlBodyYes*Message HTML (*or use templateVersionId)
textBodyNoPlain-text fallback
fromEmailNoSender; domain must be verified
fromNameNoDisplay name for sender
replyToNoReply-to address
tagsNoTags for filtering logs
metadataNoFree-form JSON for your integration
idempotencyKeyNoSafe retries (same key = same response)
templateVersionIdNoPublished template version
projectIdNoSMTP project (advanced)
unsubscribeLangNoLanguage for campaign unsubscribe page

Response (async)

{
  "id": "clxlog...",
  "status": "QUEUED",
  "queued": true,
  "position": 2
}

In development you can force synchronous delivery with ?sync=true.

Quota headers

Each response may include:

X-Quota-Limit: 5000
X-Quota-Used: 420
X-Quota-Percentage: 8
X-Quota-Warning: true

Details in Monthly quota.

Batch send

POST /emails/batch — up to 100 recipients per request. Same scope email:send.