Send your first transactional email

HTTP API quick start — token, send, and check delivery logs.

Send your first transactional email

In a few steps, send a transactional email over the HTTP API on Connect.

Before you start: Complete Domain & authorized senders — verified domain, authorized From address, and a Connect app with scope transactional_email.


1. Routee account & application

You need a Routee account on go.routee.net and a Connect application with the Transactional Email role.

Copy your Application Id and Application Secret from Applications.

Get authenticated using your application credentials


2. Get an access token

Exchange application credentials for a Bearer token:

curl -s -X POST 'https://auth.routee.net/oauth/token' \
  -u 'YOUR_APPLICATION_ID:YOUR_APPLICATION_SECRET' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&scope=transactional_email'

Use HTTP Basic auth (-u id:secret). The response includes access_token (valid 1 hour).


3. Send the email

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 for your order.</p>",
      "text": "Thank you for your order."
    },
    "isSingleChannel": true
  }'

Replace [email protected] with your verified authorized sender.

Response

HTTP 200:

{ "trackingId": "51b1738c-5fc5-4aa2-85a4-3b063c486cd7" }

This means accepted for processing — not yet delivered to the inbox.


4. Check delivery logs

Wait 1–2 minutes, then search logs:

curl -X POST 'https://connect.routee.net/email/tracking?page=0&size=10' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '[]'

Or fetch the full timeline:

curl -X GET 'https://connect.routee.net/email/tracking/single/TRACKING_ID_FROM_STEP_3' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

You can also view logs in the portal: Email → Logs on go.routee.net.


Next steps


Related