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
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient email |
subject | Yes | Subject line (max 998 characters) |
htmlBody | Yes* | Message HTML (*or use templateVersionId) |
textBody | No | Plain-text fallback |
fromEmail | No | Sender; domain must be verified |
fromName | No | Display name for sender |
replyTo | No | Reply-to address |
tags | No | Tags for filtering logs |
metadata | No | Free-form JSON for your integration |
idempotencyKey | No | Safe retries (same key = same response) |
templateVersionId | No | Published template version |
projectId | No | SMTP project (advanced) |
unsubscribeLang | No | Language 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.