Skip to the content
Sendcub

Sending email

POST/api/v1/email/send

Send a transactional email with your own template, then read what happened to it.

Updated
23 November 2026
Scopes
sendread_eventstemplates

Routes on this page

5 routes

  • POST/api/v1/email/sendsend
  • GET/api/v1/emailread_events
  • GET/api/v1/email/{id}read_events
  • GET/api/v1/templatestemplates
  • GET/api/v1/templates/{id}templates

One route sends mail. Needs the send scope.

Request

curl -X POST https://api.sendcub.com/api/v1/email/send \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-8891-receipt" \
  -d '{
    "to": "[email protected]",
    "subject": "Your order is on its way",
    "html": "<p>Thank you, Ada.</p>",
    "text": "Thank you, Ada.",
    "category": "transactional"
  }'

Response

JSON
{
  "id": "d3a71b48-5f90-42e7-8c16-9b0a2f4d7e55",
  "status": "queued",
  "recipients": 1
}

The answer is 202, because the message is accepted rather than already delivered. id is what you keep if you want to show delivery in your own admin later. status is queued, or held when the content is waiting on a review.

Two fields appear only when they apply: skipped lists any recipient left out with the reason, and heldForReview is true when the whole message is waiting. A repeat of an idempotent call answers 200 instead of 202 and carries the header Idempotent-Replayed: true, so you can tell a replay from a fresh send. One send takes at most 50 recipients.

Use a template instead of HTML

Build the email once in Sendcub and send only what changes:

cURL
curl -X POST https://api.sendcub.com/api/v1/email/send \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "[email protected]",
    "templateId": "3f1c...",
    "category": "transactional",
    "variables": { "firstName": "Ada", "orderTotal": "1,840.50 MZN" }
  }'

GET /api/v1/templates lists them with their ids and the variables each one expects, so you can check a template before you depend on it. GET /api/v1/templates/{id} returns one. Both need templates.

Always send a category

category separates transactional mail from marketing, and it decides who can opt out of what. A receipt must reach somebody who unsubscribed from your newsletter; a newsletter must not.

The field is required, and a send without it is refused with its own code, category_required, rather than a general validation error, so the first integration to meet it is told exactly what to add.

What gets refused, and why

A send is not a guarantee. Sendcub refuses before sending when:

  • the address is suppressed (suppressed), because it unsubscribed, bounced hard or complained;
  • the contact opted out of that topic (topic_opt_out);
  • the plan limit for the month is spent;
  • the workspace's sending is suspended (sending_suspended), which also covers a workspace with no verified sending domain yet;
  • the content fails the content checks (review_rejected), which is what stops a compromised key being used to send somebody else's spam from your domain.

Each refusal names itself, so your code can tell "this address is finished with" from "try again later" without parsing prose.

Reading what happened

RouteWhat it does
GET /api/v1/emailYour sent messages, newest first, by cursor, filterable by status, recipient, tag and date
GET /api/v1/email/{id}One message with its delivery state and the events against it

Both need read_events. States are queued, held, sent, delivered, bounced, complained, failed and partial, plus opened and clicked when tracking is on.

Do not poll these to drive your own logic. Subscribe to a webhook and Sendcub tells you when something happens, which is both faster for you and far lighter on the rate limit. The read routes are for showing a person a history.

Try Sendcub

Sendcub opens to customers soon. Ask for early access and we will tell you the day your account is ready.

Request early access