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/json

Body fields

FieldTypeRequiredDescription
fromstringYesAn alias you own. Supports Name <you@domain>.
tostring[]YesRecipient addresses.
subjectstringYesThe email subject line.
textstringNo*Plain-text body.
htmlstringNo*HTML body.
ccstring[]NoCarbon-copy recipients.
bccstring[]NoBlind carbon-copy recipients.
reply_tostringNoReply-To address.
headersobjectNoExtra 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…" }
StatusMeaning
200Email accepted and queued for delivery.
400Missing required fields, or from is not a valid alias.
401Missing or invalid token.
429Rate limited — check the Retry-After header.
500Sending failed (e.g. the domain's SPF record isn't set up).