Overview
mailstein is a transactional and broadcast email platform that sends from infrastructure you control. Everything the dashboard does is available over a REST API, SMTP, and official libraries.
Base URL
Every request is JSON over HTTPS. The interactive reference with full request/response schemas lives at /api/v1/ui, and the raw OpenAPI 3.0 spec at /api/v1/doc.
Authentication
Authenticate with an API key created in the dashboard under Developers → API Keys. Keys start with ms_. Pass it as a bearer token on every request:
curl https://app.mailstein.com/api/v1/domains \ -H "Authorization: Bearer ms_your_api_key"
Send your first email
curl -X POST https://app.mailstein.com/api/v1/emails \ -H "Authorization: Bearer ms_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "from": "you@yourdomain.com", "to": "someone@example.com", "subject": "Hello from mailstein", "html": "<p>It works.</p>" }'
Returns { "emailId": "em_..." }. See the Quickstart for the full path including domain verification.
Resources
Emails
Send, batch, schedule, cancel, and look up delivery status.
Domains
Add sending domains and verify SPF, DKIM and return-path.
Contacts
Contact books, contacts, bulk import and subscription state.
Campaigns
Create broadcasts, schedule, pause and resume sends.
Analytics
Email time-series and sending reputation metrics.
Webhooks
Real-time delivery, bounce, open and click events.
Three ways to send
- REST API — full control, all resources. Email API →
- SMTP — point any existing mailer at mailstein. SMTP →
- Libraries & CLI — Node, Python, a CLI, and an MCP server. Libraries →