Send an email
Queues one email for delivery, now or at scheduled_at, from a verified domain of the team.
Authorization
apiKey An API key from the dashboard (ms_…), sent as Authorization: Bearer. A sending-only key reaches the /emails routes only.
In: header
Header Parameters
Optional retry key, scoped to the team across single and batch sends for 24 hours from the initial claim. The same key and canonical payload replay the original email ids; a different payload returns 409 invalid_idempotent_request and a request still processing returns 409 concurrent_idempotent_requests. An incomplete claim can be recovered after 10 minutes. After expiry, the key can accept a new send. This is an HTTP header, not an email header.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/emails" \ -H "Idempotency-Key: order-123-confirmation" \ -H "Content-Type: application/json" \ -d '{ "from": "Acme <hello@yourdomain.com>", "to": [ "customer@example.com" ], "subject": "Your order has shipped", "html": "<p>Your order is on its way.</p>" }'{ "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"}