Getting started
The Teamander Mail API is a REST API served over HTTPS at
https://mail.teamander.com/v1. Requests and responses are JSON. Every request
authenticates with an API key sent as a Bearer token.
-
Get an API key. Create one from your dashboard, or with the
POST /v1/api-keysendpoint if you already have a key with theapikey:managescope. The raw key (tmk_...) is shown once — store it in a secret manager. -
Add and verify a sending domain (for production). Call
POST /v1/domains, publish the returned SPF/DKIM/DMARC records at your DNS provider, thenPOST /v1/domains/{domain}/verify. -
Send an email.
Terminal window curl https://mail.teamander.com/v1/emails/send \-H "Authorization: Bearer $TEAMANDER_API_KEY" \-H "Content-Type: application/json" \-d '{"to": "jane@example.com","from": "billing@yourdomain.com","subject": "Your receipt","html": "<h1>Thanks!</h1><p>Your receipt is attached.</p>"}'const res = await fetch("https://mail.teamander.com/v1/emails/send", {method: "POST",headers: {Authorization: `Bearer ${process.env.TEAMANDER_API_KEY}`,"Content-Type": "application/json",},body: JSON.stringify({to: "jane@example.com",from: "billing@yourdomain.com",subject: "Your receipt",html: "<h1>Thanks!</h1><p>Your receipt is attached.</p>",}),});const data = await res.json();console.log(data.queued);import os, requestsres = requests.post("https://mail.teamander.com/v1/emails/send",headers={"Authorization": f"Bearer {os.environ['TEAMANDER_API_KEY']}"},json={"to": "jane@example.com","from": "billing@yourdomain.com","subject": "Your receipt","html": "<h1>Thanks!</h1><p>Your receipt is attached.</p>",},)print(res.json()["queued"])
A successful send returns 201 with the queued recipients:
{ "queued": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "recipient": "jane@example.com", "status": "queued" } ]}Base URL & versioning
Section titled “Base URL & versioning”All endpoints live under the /v1 prefix:
https://mail.teamander.com/v1