Send One-Shot HTML Email
Dispatch a single transactional email by sending a pre-rendered HTML payload — no template required
Overview
Use this endpoint when you want to send a transactional email without creating a template in the dashboard. You provide the rendered HTML yourself and Minimo handles dispatch, delivery, and tracking. Typical use cases:- Server-side rendered receipts: invoices, order confirmations, shipping notifications
- Authentication flows: magic links, OTP delivery, email verification
- Internal notifications: alerts produced by your own background jobs
- Anything dynamic enough to not fit a pre-defined template
Before You Start
- Generate an API key with the
TRANSACTIONALpermission from the Minimo dashboard. - Make sure your company’s email provider is configured (SMTP or SES).
- Have your HTML body ready — Minimo doesn’t render templates for this endpoint.
What the Server Does to Your HTML
When you sendhtml, the backend:
- Resolves placeholders:
{{UNSUBSCRIBE_URL}},{{PREFERENCES_URL}}, and{{FAKE_IMAGE_URL}}are replaced with the per-recipient tracked URLs. - Strips any pre-existing tracking pixel: an
<img>whosesrcmatches the Minimo open-pixel pattern is removed so it can’t double-fire. - Rewrites tracked anchors: every
<a href>pointing tohttp(s)or a relative URL is replaced with a click-tracking URL.mailto:, fragment-only (#…), and pre-existing/api/click/*links are left alone. - Appends the open-tracking pixel at the end of
<body>(or at the document root if no<body>exists).
GET /public/v1/emails/{id}/stats.
Example Request
Response Shape
The endpoint always returns HTTP 200 when authentication succeeds — inspectstatus to know whether the provider accepted the message.
id, so the delivery row remains queryable:
Use Cases
Order receipt with embedded link
Order receipt with embedded link
View receipt anchor into a tracked link.Magic-link sign-in
Magic-link sign-in
Internal alert from a background job
Internal alert from a background job
Best Practices
Pair every send with a statsUrl lookup
The response includes statsUrl. Persist the id (or the full statsUrl) alongside whatever business object triggered the send (order id, user id, etc.) so you can correlate opens and clicks later.
Handle the failed branch
status: "failed" means the provider rejected the message — usually a malformed recipient, an unverified sender, or a hard bounce. Surface failureReason to your operators, then either retry with corrected data or log the failure.
Keep HTML self-contained
Inline your CSS. Many email clients drop<style> blocks. Test in major clients (Gmail, Apple Mail, Outlook) before going live.
Provide a text fallback for deliverability
Spam filters reward multipart messages. Adding a plain-text alternative reduces the chance of landing in the junk folder.
Don’t double-track
If your HTML already contains/api/click/* URLs or an open pixel from a previous Minimo send, leave them alone — the server detects and skips them. Inserting your own tracking on top is unnecessary.
Common Errors
| Status | Body | Cause |
|---|---|---|
400 | { "error": "to must be an email" } | Invalid or missing required field |
401 | — | API key missing or wrong format |
403 | — | API key lacks the TRANSACTIONAL permission |
200 | { "data": { "status": "failed", "failureReason" } } | Provider rejected the message (still a 200) |
500 | — | Server misconfiguration (e.g. WEB_APP_URL unset) |
Related Endpoints
- Get One-Shot Email Statistics — poll opens and clicks for a delivery
- Send Email Template — same idea, but starting from a dashboard template
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Recipient email address.
Email subject line.
Pre-rendered HTML body. The server injects the open
pixel and rewrites anchor hrefs — do not pre-process
them on your side.
Plain-text fallback for clients without HTML support.
Per-request sender override. Falls back to the company email settings.
Per-request sender display name override.
Response
Delivery accepted by the queue. Check data.status to tell
whether the provider actually accepted the message.