Qsendyx

Send email

POST /email/messages accepts raw content or a template, never both, and returns 202 with a message you can poll.

Send a message

POST /email/messages accepts either raw content or a template, never both. With raw content, subject is required alongside html or text. With template_id, the body comes from the active version of the template and variables fills the placeholders.

curl -X POST https://api.qsendyx.com/api/v1/email/messages \
  -H "Authorization: Bearer $QSENDYX_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "from":    { "email": "you@yourcompany.com", "name": "Your Company" },
    "to":      [{ "email": "user@example.com" }],
    "subject": "Welcome aboard",
    "html":    "<h1>You are in.</h1>"
  }'
json
{
  "from":        { "email": "you@yourcompany.com" },
  "to":          [{ "email": "user@example.com" }],
  "template_id": "019f70c2-2b41-7a5e-9c3e-2f1a8d55b310",
  "variables":   { "name": "Ana", "order_id": "A-1042" }
}
Template mode — no html, no text.

Request fields

FieldNotes
fromObject with email and optional name. Must be a verified domain or sender.
toArray of recipients, at least one.
subjectRequired unless template_id is present, where it overrides the template.
html / textRaw content. Mutually exclusive with template_id.
template_id / variablesTemplate mode. Templates are sandboxed — they never execute code.
typetransactional (default) or marketing. Separate identities, separate reputation.
send_atSchedules the send. UTC.
tags / metadataYours. Returned on events, useful for correlation.
trackingPer-message opens and clicks toggles.

Response and status

json
{
  "id": "019f7141-46ac-76c3-8276-042f38c68cd8",
  "status": "queued",
  "channel": "email",
  "to": "user@example.com",
  "from": "you@yourcompany.com",
  "type": "transactional",
  "created_at": "2026-07-17T18:05:31Z",
  "estimated_cost_micros": 0,
  "currency": "USD"
}
202 Accepted. The message is queued, not yet delivered.

Poll GET /email/messages/{id} for the current state, or — better — subscribe to webhooks and let the status come to you.

cURL
curl https://api.qsendyx.com/api/v1/email/messages/019f7141-46ac-76c3-8276-042f38c68cd8 \
  -H "Authorization: Bearer $QSENDYX_TOKEN"
Money is in micro-dollars: 1 USD = 1,000,000 micros, always an integer. An email costs on the order of US$ 0.0008, which whole cents would round to zero. estimated_cost_micros is 0 when the send falls inside your plan quota — it was already paid by the subscription. Above the quota it carries your plan overage rate, or your credits absorb it.