Skip to content

Webhook events ​

Every event shares the same format. What changes from one to another is the value of type and the detail block that comes with data.email.

Request format ​

Each event is a POST request with a JSON body:

http
POST /webhooks/mailiqo HTTP/1.1
Host: your-server.com
Content-Type: application/json
User-Agent: Mailiqo-Webhooks/1
webhook-id: evt_5f1c2a9e8b7d4c3fa2b1c0d9e8f7a6b5
webhook-timestamp: 1767263349
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
json
{
  "id": "evt_5f1c2a9e8b7d4c3fa2b1c0d9e8f7a6b5",
  "type": "email.delivered",
  "timestamp": 1767263347,
  "data": {
    "email": {
      "id": "msg_8c2db7094df247c4b03f6f1d2a9e5c10",
      "send_id": "snd_ecbc059748234c9c9cbb0a1b2c3d4e5f",
      "recipient_email": "[email protected]",
      "recipient_type": "to",
      "channel": "api",
      "sending_domain": "yourdomain.com"
    }
  }
}

The body arrives on a single line, with no spaces; it is formatted here for reading. The webhook-id, webhook-timestamp and webhook-signature headers are used to verify the signature.

Common fields ​

FieldTypeDescription
idstringEvent identifier. It is the same on every delivery attempt and matches the webhook-id header
typestringEvent type
timestampintegerWhen the fact happened, in Unix seconds (UTC). It is not the delivery time
data.emailobjectThe email the event refers to

The data.email object ​

FieldTypeDescription
idstringIdentifier of this recipient's email (msg_...). It is the same as sent_to[].id in the send response and the one used by GET /email-message/{id}
send_idstringIdentifier of the send request (snd_...), shared by all its recipients. It is the one used by GET /email-request/{id}
recipient_emailstringRecipient address
recipient_typestringto, cc or bcc
channelstringHow it was sent: api or smtp
sending_domainstringSending domain

Each recipient produces its own events: a send to three addresses results in three email.delivered, each with its own id.

email.delivered ​

The recipient's mail server accepted the message. It carries no detail block: data only contains email.

Being accepted by the server does not say which folder it ends up in: the recipient's mail provider decides that.

email.bounced ​

The destination server returned the message. The bounce block says why:

json
{
  "id": "evt_1b9d6c4e7a2f4d8e9c3b5a7f0e1d2c3b",
  "type": "email.bounced",
  "timestamp": 1767263352,
  "data": {
    "email": {
      "id": "msg_8c2db7094df247c4b03f6f1d2a9e5c10",
      "send_id": "snd_ecbc059748234c9c9cbb0a1b2c3d4e5f",
      "recipient_email": "[email protected]",
      "recipient_type": "to",
      "channel": "api",
      "sending_domain": "yourdomain.com"
    },
    "bounce": {
      "type": "hard",
      "category": "general",
      "diagnostic": "smtp; 550 5.1.1 user unknown"
    }
  }
}
FieldTypeDescription
bounce.typestringhard (permanent), soft (temporary) or undetermined (could not be classified)
bounce.categorystringReason within the type. See the table below
bounce.diagnosticstring or nullResponse from the destination server. It is informational and its text is not stable: decide with type and category

What to do with each bounce ​

typecategoryWhat happenedWhat to do
hardgeneralThe address does not exist, or the server rejects it permanentlyStop sending to that address and mark it as invalid
hardsuppressedThe address is on a suppression list because of earlier bounces or complaints: no delivery was attemptedDo not send to it again. If you know it is valid again, open a support ticket
softgeneralTemporary failure at the destination serverYou can send again later. If it keeps happening for several days, treat the address as invalid
softmailbox_fullThe recipient's mailbox is fullSend again after a few days. If nothing changes, stop sending
softmessage_too_largeThe message is larger than the destination server acceptsReduce its size, usually the attachments, and send again
softcontent_rejectedThe destination server rejected the contentReview the content before sending again
softattachment_rejectedThe destination server rejected an attachment, because of its type or sizeRemove or change the attachment and send again
undeterminedgeneralThe cause could not be determinedCheck diagnostic. If it happens again with the same address, treat it as hard

A soft bounce arrives once the delivery retries have run out: Mailiqo does not try again on its own. If you want to resend the message, make a new send.

New categories can be added. If you receive one you do not know, decide with type.

Notices that do not produce an event

A temporary notice that arrives when the message is already recorded as delivered — an out-of-office auto-reply, for example — does not produce email.bounced.

email.complained ​

The recipient marked the message as spam and their mail provider reported it. The rest of the event is the same; inside data comes the complaint block:

json
"complaint": {
  "feedback_type": "abuse"
}
FieldTypeDescription
complaint.feedback_typestring or nullKind of complaint reported by the recipient's provider: abuse, fraud, virus, not-spam, auth-failure or other. Many providers do not report it

What to do: stop sending to that address. Complaints damage the reputation of your sending domain.

email.rejected ​

The message was discarded before being sent. It never left for the recipient, and sending it again unchanged will give the same result. Inside data comes the rejection block:

json
"rejection": {
  "reason": "invalid_recipient",
  "message": "The recipient address does not exist or cannot receive email."
}
reasonWhat happenedWhat to do
invalid_recipientRecipient validation discarded the addressFix the address or stop sending to it
spam_contentThe content was classified as spamReview the content before sending again
sending_policyMailiqo blocked the send under its sending policy: the risk of the message, or the reputation of the account or the domainCheck the domain status in the panel or open a support ticket
provider_rejectedThe sending service rejected the message, for example because it contained a virusReview the content and the attachments

rejection.message is a text with the detail, or null. It is informational and can change: decide with reason.

Recipients the API discards when it receives the request — those in rejected_recipients — do not produce an event: they already come back with their reason in the POST /send response.

email.failed ​

The message could not be sent because of a technical problem, and no further attempt will be made. Inside data comes the failure block:

json
"failure": {
  "reason": "provider_error",
  "message": "The email could not be sent after several temporary delivery problems."
}
reasonWhat happenedWhat to do
provider_errorSending failed several times because of temporary problems and the retries ran outYou can send it again
template_errorThe content of the message could not be generatedReview the template and its variables before sending again
internal_errorInternal Mailiqo errorSend it again. If it keeps happening, open a support ticket

failure.message is a text with the detail, or null. Decide with reason.

endpoint.ping ​

It does not describe an email: it is used to check that your server receives and verifies the requests. It is only sent when you click Send ping in the panel, whatever the endpoint's event list is.

json
{
  "id": "evt_0c9d4e1f7a2b4c6d8e0f1a2b3c4d5e6f",
  "type": "endpoint.ping",
  "timestamp": 1767263400,
  "data": {
    "endpoint": {
      "sending_domain": "yourdomain.com",
      "events": ["email.delivered", "email.bounced"]
    }
  }
}

It has no data.email. It is signed like any other event. It is not retried and does not appear in the delivery log: the panel shows right away the status your server answered with, how long it took and the first bytes of the response. A successful ping also clears the endpoint's Failing since mark. Answer 2xx and do nothing else.

How events map to the email status ​

Each event is emitted when the email moves to one of these status values in GET /email-message/{id}:

Eventstatus
email.delivereddelivered
email.bouncedbounced
email.complainedcomplained
email.rejectedrejected
email.failedfailed or error

The other statuses (processing, sent, opened, clicked and the rest) do not produce an event.

Built with VitePress