Send Email
POST /api/v0/send
Send an email from one of your mailbox aliases. The from address must be an alias you own, on a domain that has given ZXC Mailing permission to send (see Custom Domain).
Request
POST https://api.email.zxcinc.dev/api/v0/send
Authorization: Bearer YOUR_TOKEN
Content-Type: application/jsonBody fields
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | An alias you own. Supports Name <you@domain>. |
to | string[] | Yes | Recipient addresses. |
subject | string | Yes | The email subject line. |
text | string | No* | Plain-text body. |
html | string | No* | HTML body. |
cc | string[] | No | Carbon-copy recipients. |
bcc | string[] | No | Blind carbon-copy recipients. |
reply_to | string | No | Reply-To address. |
headers | object | No | Extra custom headers as key/value pairs. |
✉️
*Provide at least one of text or html. You can send both — clients will pick the best one to display.
Example
curl https://api.email.zxcinc.dev/api/v0/send \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": "you@yourdomain.com",
"to": ["friend@example.com"],
"subject": "Hello from ZXC Mailing",
"text": "Sent straight from the API."
}'Responses
On success you get a 200 with the new email id:
{ "success": true, "email_id": "abc123…" }| Status | Meaning |
|---|---|
200 | Email accepted and queued for delivery. |
400 | Missing required fields, or from is not a valid alias. |
401 | Missing or invalid token. |
429 | Rate limited — check the Retry-After header. |
500 | Sending failed (e.g. the domain's SPF record isn't set up). |
