Skip to content

message.complained

POST

A recipient marked a sent message as spam (the address is suppressed, sending may be paused). A webhook of scope project or inboxes gets it. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (disabled_reason: failing). Each attempt counts toward the organization’s webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook’s log (GET /v0/webhooks/{webhook_id}/attempts). Verify webhook-signature with the webhook’s secret; webhook-id is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.

Media typeapplication/json
MessageRecipientBody

The body POSTed when one recipient of a sent message was delivered to, bounced, complained, was rejected or unsubscribed: the message and that recipient.

object
event_id
required
Event Id
string
/^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$/
event_type
required
Event Type
string
Allowed values: message.delivered message.bounced message.complained message.rejected message.unsubscribed
occurred_at
required
Occurred At
string format: date-time
message
required
MessageItem

A message in a list: no bodies.

object
version
required
Version

Goes up by one on every change: of two copies, the one with the higher version is the newer.

integer
message_id
required
Message Id
string
/^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$/
project_id
required
Project Id
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/
inbox_id
required
Inbox Id
string
/^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$/
thread_id
required
Thread Id
string
/^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$/
envelope_to
required
Envelope To

The address the message came to; null for a message the inbox sent (sent).

Any of:
string
envelope_from
required
Envelope From
string
plus_tag
required
Plus Tag
Any of:
string
from
required
From
Array<object>
Party

A name and address from a header.

object
name
required
Name
string
address
required
Address
string
to
required
To
Array<object>
Party

A name and address from a header.

object
name
required
Name
string
address
required
Address
string
subject
required
Subject
Any of:
string
preview
required
Preview
Any of:
string
labels
required
Labels
Array<string>
size
required
Size
integer
received_at
required
Received At
string format: date-time
recipient
required
RecipientOut

One recipient of a sent message and what became of it so far (each time is set once).

object
address
required
Address
string
kind
required
RecipientKind

How a sent message names a recipient (a delivery’s kind): To and Cc are in its headers, Bcc is not.

string
Allowed values: to cc bcc
reason
required
Reason

Why it bounced or was rejected: the receiving server’s words through SES (untrusted), or ours.

Any of:
string
sent_at
required
Sent At

When SES took it, or it was handed to an inbox of ours.

Any of:
string format: date-time
delivered_at
required
Delivered At
Any of:
string format: date-time
bounced_at
required
Bounced At
Any of:
string format: date-time
complained_at
required
Complained At
Any of:
string format: date-time
rejected_at
required
Rejected At
Any of:
string format: date-time
unsubscribed_at
required
Unsubscribed At
Any of:
string format: date-time

Example

{
"event_id": "evt_01je56wqswfmn9pgbc1wq8tjgq",
"event_type": "message.complained",
"occurred_at": "2026-12-01T12:00:00Z",
"message": {
"version": 1,
"message_id": "msg_01je56wqswfmn9pgbc1wq8tjgq",
"project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq",
"inbox_id": "inb_01je56wqswfmn9pgbc1wq8tjgq",
"thread_id": "thr_01je56wqswfmn9pgbc1wq8tjgq",
"envelope_to": null,
"envelope_from": "test@k7m2xq4p.yoagent.email",
"plus_tag": null,
"from": [
{
"name": "",
"address": "test@k7m2xq4p.yoagent.email"
}
],
"to": [
{
"name": "Ada",
"address": "ada@example.com"
}
],
"subject": "Your report is ready",
"preview": "Hello from a test.",
"labels": [
"sent"
],
"size": 2048,
"received_at": "2026-12-01T12:00:00Z"
},
"recipient": {
"address": "ada@example.com",
"kind": "to",
"reason": null,
"sent_at": "2026-12-01T12:00:00Z",
"delivered_at": null,
"bounced_at": null,
"complained_at": "2026-12-01T12:00:00Z",
"rejected_at": null,
"unsubscribed_at": null
}
}

Delivered: any 2xx within 10 s (its body is not read).