Skip to content

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 ​

EndpointWhat it does
POST /v1/mailing/sendQueues a send with the content in the request
POST /v1/mailing/send-templateQueues 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 recipient

One 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:

PrefixObjectWhere you get it
snd_Send requestdata.id in the send response
msg_Email of one recipientdata.sent_to[].id in the send response
val_ValidationEmail validation API
evt_Webhook eventid 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:

statusHTTPMeaning
success200Every recipient was accepted
warning200Some accepted and some rejected; check rejected_recipients
error400No 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:

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:

CodeMeaning
1412No valid recipient was found
1413More than 50 valid recipients in one request
1417Monthly email quota exhausted
1418Additional email limit reached
1419Invalid validation options
1421Hourly or daily sending limit reached (HTTP 429). See Sending limits
1422The message alone exceeds the hourly or daily sending limit (HTTP 400). Split it into smaller messages

Built with VitePress