Email API
Send email with one authenticated request.
A single REST endpoint sends your transactional mail. Authenticate with a scoped key, post JSON, and get a message id you can follow through the activity log. Use an SDK or plain HTTP, whichever fits your stack.
curl https://api.mailhuset.com/v1/email \
-H "Authorization: Bearer mh_live_..." \
-d '{"from":"you@yourapp.com",
"to":"user@example.com",
"subject":"Reset your password",
"template":"password-reset",
"model":{"name":"Amara"}}'
→ 200 { "id":"msg_a91f2c", "status":"queued" }A small API that stays out of your way
Everything you need to send reliably, and nothing you have to configure before your first message goes out.
Send raw or by template
Post HTML and text directly, or reference a saved template by alias and pass a model of values to merge in.
Scoped API keys
Create keys limited to sending, rotate them on a schedule, and revoke any key the moment you need to.
Idempotency keys
Attach an idempotency key and a retried request never sends twice, even if the network drops your response.
Attachments and headers
Add attachments, custom headers, reply-to and tags on any message, all in the same JSON body.
Rate limits and usage alerts
An account-wide rate limit stops a busy or buggy job from flooding your recipients, and we email you at 80% and 100% of your allowance before overage starts.
Message ids and status
Every send returns a message id and status, so you can look it up, follow its timeline, or match it to a webhook.
SMTP relay
On paid plans, apps and plugins that only speak SMTP send through smtp.mailhuset.com with the same rules, events and activity log as the API.
Common questions
- Do I have to use an SDK?
- No. The API is plain REST over HTTPS, so any language that can make an authenticated request works. SDKs are there to save you boilerplate, not because they are required.
- How do I keep a retry from sending twice?
- Send an idempotency key with the request. If the same key arrives again, we return the original result instead of sending a second copy.
- Can I limit what a key can do?
- Yes. Keys are scoped, so a sending key cannot manage your account, and you can rotate or revoke any key at any time.
- What happens if I hit a rate limit?
- The API returns a 429 with a clear error code you can back off on. The limit applies to the whole account, and the free plan pauses at its allowance rather than billing overage.
- Can I send over SMTP instead of the API?
- Yes, on paid plans. Point your app at smtp.mailhuset.com on port 587 or 465 with an SMTP credential from the dashboard. Mail sent that way follows the same rules as the API: verified senders, suppressions and limits.
Related reading
Send your first request in minutes
Create a scoped key, post one JSON body, and watch the message move through your activity log.