Start
Quickstart
Go from an API key to a tracked transactional email in four short steps.
On this page
1. Prepare the workspace
Verify a sending domain and add a Sending Address. The from value must exactly match that verified address.
2. Create an API key
Create a key from Developers and store it in your server environment. Grant email:send, plus email:read when a service needs independent status access.
Environment variable
ROUTEKITE_API_KEY="rk_your_key"3. Send an email
Generate one idempotency key for this logical email. Retry the identical request with the same key after an uncertain connection failure.
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"}
4. Track the result
Save the returned ID and retrieve it. Submitted means accepted by the receiving delivery network. Delivered requires a later confirmation.
Retrieve status
const response = await fetch("https://routekite.com/api/v1/emails/7dd5da7f-40b0-4c29-bb78-7e0d95ef9eb7",{ headers: { Authorization: `Bearer ${process.env.ROUTEKITE_API_KEY}` } },);const email = await response.json();
200 Response
{"object": "email","id": "7dd5da7f-40b0-4c29-bb78-7e0d95ef9eb7","state": "delivered","purpose": "transactional","from_email": "updates@example.com","from_name": "Example Store","reply_to_email": "support@example.com","to_email": "customer@example.net","subject": "Your order is confirmed","queued_at": "2026-08-27T10:30:00.000Z","submitted_at": "2026-08-27T10:30:02.000Z","delivered_at": "2026-08-27T10:30:05.000Z","terminal_at": "2026-08-27T10:30:05.000Z","failure_code": null,"failure_message": null,"created_at": "2026-08-27T10:30:00.000Z"}