Send a transactional email

Send one transactional email (one event, one payload) to one or more recipients.

Use for password resets, receipts, shipping updates, and other app-triggered mail. Clean addresses first with Email Validator. Verify domains/senders before first send (Setting up your email account). Marketing blasts belong in Waymore, not this API.

A 200 response means the message was accepted for processing — not delivered — and that at least one valid to was accepted. Persist trackingId and recipients[]. Invalid to / cc / bcc mailboxes may appear in rejected[] (not charged, no timeline). If every to fails local mailbox syntax, the API returns 400 with to: at least one valid mailbox address. Invalid from / replyTo reject the whole request.

Persist ids, then poll Search email tracking / Get email tracking (single message timeline) after ~1–2 minutes, or configure callback webhooks.

Common failures: 400 unverified domain/sender, mailbox syntax, validation, or insufficient balance; 401 bad token; 403 missing transactional_email scope.

Quickstarts: Send your first email (HTTP API), Send transactional email via SMTP.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Send a transactional email over HTTP API v2 on Connect (https://connect.routee.net/transactional-email).

HTTP 200 means the message was accepted for processing, not delivered to the recipient's inbox. Delivery status arrives asynchronously via optional callbacks or the Email Tracking API.

Authentication

  1. Obtain a Bearer token with OAuth 2.0 client credentialsPOST https://auth.routee.net/oauth/token using HTTP Basic auth (Application ID : Application Secret), grant_type=client_credentials, and scope=transactional_email. See Get authenticated using your application credentials.
  2. Call this endpoint with Authorization: Bearer {access_token}.

Do not send a Principal header (or any account-id header). Routee resolves your tenant from the OAuth token.

Usage is charged against your Transactional Email subscription on go.routee.net (Email → Pricing → My Plan). Ensure the subscription is active before sending; otherwise the API returns HTTP 400 with error code 000004 (No active subscription exists).

Example — cURL

# 1) Token (Basic auth with application credentials)
curl -s -X POST 'https://auth.routee.net/oauth/token' \
  -u 'YOUR_APPLICATION_ID:YOUR_APPLICATION_SECRET' \
  -d 'grant_type=client_credentials&scope=transactional_email'

# 2) Send (Bearer token from step 1)
curl -X POST 'https://connect.routee.net/transactional-email' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{
    "from": { "name": "Acme", "address": "[email protected]" },
    "to": [{ "address": "[email protected]" }],
    "subject": "Order confirmed",
    "content": { "html": "<p>Thank you.</p>" }
  }'

Response

FieldDescription
trackingIdPrimary id for Search email tracking and Get email tracking (single message timeline).

Tracking rows typically appear within 1–2 minutes after a successful send.

Common HTTP 400 errors

errorCodeTypical cause
000000Invalid or unverified sending domain
000001Invalid sender address
000002Unverified sender
000003Message size limit exceeded
000004No active subscription
000005Insufficient subscription resources

Skip link and open tracking

By default Routee rewrites HTML links for click tracking and injects an open-tracking pixel (trackLinks and trackOpens default to true). Set either flag to false on this request to leave original hrefs and/or skip the pixel.

{
  "from": { "address": "[email protected]" },
  "to": [{ "address": "[email protected]" }],
  "subject": "Order confirmed",
  "content": { "html": "<p>Thanks. <a href=\"https://example.com/order\">View order</a></p>" },
  "trackLinks": false,
  "trackOpens": false
}

These flags control instrumentation of the message. callback.eventCallback is separate — it only configures webhook URLs for opens and clicks that actually occur. HTTP API only; SMTP has no equivalent fields. Field reference: Track Links & Opens Explained.

Optional callback.statusCallback and callback.eventCallback (onOpen, onClick) receive HTTPS POST notifications as the message progresses. Engagement callbacks fire on every open/click; webhook results[] is latest-only — see Email callback payloads. Set send-time label to your campaign id for searchable tracking (fieldName=label / tags).

Body Params

Payload for one transactional send. Required: from, to (≥1), and content with html. Clean addresses first with Email Validator.

from
object
required

Sender address — must be an authorized sender on a verified domain.

replyTo
object

Named email address used for from/to/cc/bcc/reply-To.

to
array of objects
required
length ≥ 1

Primary recipients (min 1). Each address must be local mailbox syntax (local@domain).
Invalid entries are dropped into the response rejected[]; the request succeeds only if at least one valid to remains.

to*

Named email address used for from/to/cc/bcc/reply-To.

string
required

RFC 5322 email address. For from, must belong to a verified domain / authorized sender on your account.

string

Optional display name shown in the mail client (for example Acme Support).

cc
array of objects

Carbon-copy recipients. Invalid addresses are dropped into rejected[] and are not sent.

cc
bcc
array of objects

Blind carbon-copy recipients. Invalid addresses are dropped into rejected[] and are not sent.

bcc
customHeaders
array of objects
length ≤ 10

Optional custom headers (max 10).

customHeaders
string
length ≤ 144

Email subject (max 144 characters).

content
object
required

HTML/text body of the message.

attachments
array of objects

Optional Base64 attachments.

attachments
date-time

Optional UTC schedule time (ISO-8601). Omit to send immediately.

integer
≥ 0

Time-to-live in minutes for delivery attempts.

integer
≥ 0

Maximum delivery attempts when supported by the pipeline.

callback
object

Optional status and engagement webhook configuration.

string
length ≤ 80

Correlation / campaign label (max 80). Filterable in tracking search.

dsn
object

Optional DSN settings.

boolean
Defaults to true

When false, open tracking via the tracking pixel is disabled. Default true.

Responses

401

Unauthorized — missing, invalid, or expired Bearer token. Obtain a new token from Authentication.

403

Access denied — token lacks transactional_email (or equivalent) permission/scope.

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json