Meghly Send
Send API reference
The fields of POST /api/v1/messages, its limits and error codes, plus the events, analytics, templates, webhooks, suppressions and mailing-list endpoints.
POST /api/v1/messages with a Send key in the X-Api-Key header. Field names are camelCase.
What a request can carry
| Field | Use | Limit |
|---|---|---|
from, fromName | Sender | The domain must be verified on your account |
to, toName | Recipient | One address (or one mailing-list address) |
cc, bcc | Copies | 50 each; each is checked against suppressions |
replyTo | Reply address | One address |
subject, html, text | Content | A text part is made from the HTML when missing |
templateSlug, variables | Use a template | Newest active version, rendered at acceptance |
attachments[] | Files and inline images | 25 per message; size limit by plan |
tags[] | Labels | 10 per message |
metadata{} | Your own data, echoed on webhooks | 50 entries |
trackOpens, trackClicks | Tracking | Default comes from the domain |
sendAt | Schedule | Up to 7 days ahead |
testMode | Check without sending | Nothing is stored or sent |
Send the header Idempotency-Key to make retries safe: a repeated request returns the first message.
Errors
| Code | Meaning |
|---|---|
| 400 | Bad request |
| 401 | Missing or wrong key |
| 403 | A Domain key used for another domain |
| 413 | Message too large |
| 422 | The recipient is suppressed |
| 429 | Quota reached or bounce protection |
Events and analytics
GET /api/v1/events lists delivery and engagement events, newest first. Filter by event (accepted, queued, sent, delivered, failed, rejected, opened, clicked, complained, unsubscribed), severity, recipient, tag, domain and a time range of up to 30 days.
GET /api/v1/analytics?resolution=day returns counts per bucket and totals with delivered, bounce, open, click and complaint rates.
Other resources
Templates, webhooks, contact lists and suppressions are available by API key, each with its own scope. See the scopes when you make a key.
Mailing lists
Make a list on one of your domains, add members (one by one or by CSV import), then send to the list address. Each subscribed member gets their own copy, tagged list:<address>. A list send cannot use cc or bcc, and an empty list is refused.
Not supported yet
Custom message headers, several addresses in one to, and per-message required TLS.