Email sending API
Queue emails and follow their delivery recipient by recipient. There are two ways to send — with the content in the request itself, or with a stored template — and two query endpoints to find out what happened afterwards.
Every request uses the X-API-KEY header. See Authentication.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/mailing/send | Queues a send with the content in the request |
POST /v1/mailing/send-template | Queues a send using a stored template |
GET /v1/mailing/email-request/{id} | Request status and the messages it generated |
GET /v1/mailing/email-message/{id} | Delivery status and validation for one recipient |
Sending is asynchronous
The API accepts the request and queues it; it does not deliver on the spot. That is why a successful request does not yet mean a successful delivery, and you follow it afterwards:
POST /v1/mailing/send -> request id (snd_...) and sent_to[].id (msg_..., one per recipient)
GET /v1/mailing/email-request/{id} -> request status and message_ids[]
GET /v1/mailing/email-message/{id} -> status and validation for that recipientOne request (email_request) generates one message per recipient (email_message). Delivery status, opens, clicks and the validation result live on the message, not on the request.
Identifiers
Every identifier carries a prefix that tells you what it refers to:
| Prefix | Object | Where you get it |
|---|---|---|
snd_ | Send request | data.id in the send response |
msg_ | Email of one recipient | data.sent_to[].id in the send response |
val_ | Validation | Email validation API |
evt_ | Webhook event | id of each webhook event |
The msg_ identifier is the same in the send response, in GET /email-message/{id} and in data.email.id of every webhook event, so you can match them directly.
Identifiers without a prefix
Sending responses still include uuid, email_message_base_uuid and email_messages: the same identifiers without the prefix, kept for existing integrations. Both query endpoints accept either form. New integrations should use id, send_id and message_ids.
Without polling: webhooks
If you would rather have Mailiqo notify your server when an email is delivered, bounces or fails, instead of querying its status, use webhooks.
The three response states
Both sending endpoints return a wrapped response, and it can resolve three ways depending on how many recipients were accepted:
status | HTTP | Meaning |
|---|---|---|
success | 200 | Every recipient was accepted |
warning | 200 | Some accepted and some rejected; check rejected_recipients |
error | 400 | No recipient was accepted, or the request was invalid |
Always check rejected_recipients
A 200 does not guarantee that all your recipients got through. With status = warning the request is queued only for the accepted ones, and the dropped ones come back with their reason in data.rejected_recipients. When none is accepted, that same list arrives in error.details.rejected_recipients.
Recipients
to, cc and bcc accept the same four formats (a single address, a list, an object with a name, or a list of objects), documented in Recipients format.
A maximum of 50 valid recipients per request is allowed. If more than 50 are accepted after preprocessing, the request is rejected.
Recipient validation
Before delivering, Mailiqo checks that each recipient exists and is deliverable. It is configured per domain, and any send can tighten it with the validation object:
- Validation for this send — the parameter, with an example
- Recipient validation — what gets checked and how it is configured
- Email validation API — check addresses without sending them anything
The per-recipient result does not come back in the send response: the advanced check happens after you are answered. You read it in the validation block of GET /email-message/{id}.
Errors
Sending codes run from 1400 to 1422 and are listed in the error reference. The most common:
| Code | Meaning |
|---|---|
1412 | No valid recipient was found |
1413 | More than 50 valid recipients in one request |
1417 | Monthly email quota exhausted |
1418 | Additional email limit reached |
1419 | Invalid validation options |
1421 | Hourly or daily sending limit reached (HTTP 429). See Sending limits |
1422 | The message alone exceeds the hourly or daily sending limit (HTTP 400). Split it into smaller messages |
