Skip to documentation
Dashboard
Guides

Send transactional email

Compose one clear request, submit it safely, and retain the message identifier.

On this page

Request shape

Every request sends to exactly one recipient. Use a verified Sending Address, provide a subject, and include HTML, plain text, or both. Add optional preview_text with HTML to control the short summary shown beside the subject in supported inboxes.

Send request
const response = await fetch("https://routekite.com/api/v1/emails", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.ROUTEKITE_API_KEY}`,    "Idempotency-Key": "order-123-confirmation",    "Content-Type": "application/json",  },  body: JSON.stringify({    from: "updates@example.com",    to: "customer@example.net",    reply_to: "support@example.com",    subject: "Your order is confirmed",    preview_text: "Your receipt and delivery details are inside.",    html: "<h1>Thank you</h1><p>Your order is confirmed.</p>",    attachments: [      {        filename: "notes.txt",        content_type: "text/plain",        content: Buffer.from("Hello from RouteKite.").toString("base64"),      },      "c6ea638c-28a4-4b0c-a39d-74f1d29e1e9f",    ],  }),}); const email = await response.json();
202 Accepted
{  "id": "7dd5da7f-40b0-4c29-bb78-7e0d95ef9eb7",  "object": "email",  "status": "queued",  "created_at": "2026-08-27T10:30:00.000Z"}

Message content

  • Provide both html and text when possible.
  • Keep subjects between 1 and 998 characters.
  • Use metadata only for small correlation values.
  • Embed files up to 5 MB as Base64 or reference ready uploaded attachment IDs.

What 202 Accepted means

A 202 response means RouteKite validated and queued the message. It does not mean the recipient has received it. Retrieve the ID to observe the delivery result.

On this page