Email API
Transactional email in one request
Send sign-in codes, receipts and alerts with a single REST call, then follow every email from queued to delivered.
POST /emailsExamplecurl -X POST https://api.send.io/emails \
-H "Authorization: Bearer mx_your_key" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <login@acme.com>",
"to": "ada@example.com",
"subject": "Your sign-in code",
"html": "<p>Your code is <b>482913</b></p>"
}'
200 {"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"}Keys start with mx_. Use a sending-scoped key for services that only send.
Works with the stack you have
Plain JSON over HTTPS. Any language that can make a request can send, and the CLI covers the terminal.
Four fields to start: from, to, subject and html or text. You get back an id.
curl -X POST https://api.send.io/emails \
-H "Authorization: Bearer $SENDIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <login@acme.com>",
"to": "ada@example.com",
"subject": "Your sign-in code",
"html": "<p>Your code is <b>482913</b></p>"
}'A field or an endpoint for each job
Send later, send many at once, attach the invoice or retry safely. Same API, same key, same events.
Schedule
Send it later
ISO 8601 or plain words like "in 2 hours", up to 30 days ahead. Move it with
PATCHor cancel it before it is picked up.scheduled_atBatch
Send many at once
Up to 100 emails in one call, tracked under one
batch_id. Strict by default: one bad item fails the call.POST /emails/batchAttachments
Attach the file
Base64
contentor a public URL inpath. Inline images withcontent_id.attachments[]Idempotency
Retry, send once
If a timeout makes your code try again, the retry returns the first result instead of a second email. Keys are kept for 24 hours.
Idempotency-Key
See every call and every event
Each API request is logged. Each email keeps a per-recipient event history, and webhooks push the same events to you as they happen.
Filter across all emails with GET /emails/events?type=bounced,complained.
GET /emails/{id}/eventsExample- 09:15:20.104queued
- 09:15:20.151sent
- 09:15:21.020delivery_delayedDeferred by the receiving server
- 09:15:24.210bouncedclass hard · smtp_code 550 · 5.1.1 · suppressed true
Events are kept for 30 days.
Rehearse every outcome before launch
Four addresses simulate delivery, a hard bounce, a spam complaint and a suppression, with real events and webhooks. Nothing reaches a real inbox.
With only test recipients you can send from onboarding@send.io before your domain is verified.
delivered@send.io- Delivered:
email.sent, thenemail.delivered bounced@send.io- Hard bounce:
email.bounced complained@send.io- Spam complaint:
email.delivered, thenemail.complained suppressed@send.io- Not sent:
email.suppressed
Add a label to match tests to runs, such as bounced+ci-1881@send.io.
Your first email is one request away.
Start free with welcome credits and send your first email in minutes.
