Quickstart
From zero to your first email in 60 seconds. We'll authenticate, verify a domain, and send a message.
1. Get your API key
Request an API key via the contact form. You'll get an mb_live_… token by email. Save it somewhere safe — it can't be recovered.
2. Verify your sending domain
Add the DKIM CNAMEs we provide to your DNS. SES verifies within ~5 minutes once they resolve.
curl -X POST https://api.mailgrid.space/api/domains/verify \ -H "Authorization: Bearer $MAILGRID_KEY" \ -H "Content-Type: application/json" \ -d '{ "domain": "yourdomain.com" }'
The response includes three DKIM tokens. Add each as a CNAME record at your DNS provider, set to DNS-only (not proxied).
3. Send your first email
curl -X POST https://api.mailgrid.space/api/emails \ -H "Authorization: Bearer $MAILGRID_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "hello@yourdomain.com", "to": "you@example.com", "subject": "first send", "text": "it lives" }'
Response (HTTP 200):
{
"success": true,
"data": {
"messageId": "0107019a-43cf-7e3d-...",
"status": "sent",
"to": ["you@example.com"]
},
"requestId": "fd067654-..."
}
4. Watch the event log
curl https://api.mailgrid.space/api/events \ -H "Authorization: Bearer $MAILGRID_KEY"
You'll see sent, delivered, and (if you have tracking enabled) opened / clicked events appear in real time.
What's next?
- Email API — every option for
POST /api/emails - Templates — Handlebars + AI generation
- Multi-stream sending — split transactional from marketing
- MCP server — drive Mailgrid from Claude / Cursor
Sandbox mode
By default AWS SES accounts can only send to verified recipient addresses (the sandbox). To send to anyone, request production access in the AWS SES console.