Skip to content

message.received

POST

A message arrived in an inbox the webhook covers. A webhook of scope project, inboxes or catch_all 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
MessageReceivedBody

The body POSTed for message.received: the message as it arrived, the same on every retry; signed per Standard Webhooks (webhook-id = event_id).

object
event_id
required
Event Id

The same on every retry of this event: deduplicate on it.

string
/^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$/
event_type
required
Event Type
string
Allowed value: message.received
occurred_at
required
Occurred At
string format: date-time
message
required
WebhookMessage

The message in a webhook body: the list shape plus what a test needs right away (no HTML, no headers).

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
extracted_text
required
Extracted Text

Dropped (null) when the body would exceed 256 KB.

Any of:
string
links
required
Links
Array<object>
Link

A link found in a message when it arrived: its URL, its text and what it is for.

object
url
required
Url
string
text
required
Text
string
kind
required
LinkKind

What a link is for, guessed from its text and URL.

string
Allowed values: verify reset unsubscribe other
codes
required
Codes
Array<object>
Code

A one-time code found in a message when it arrived, with the text around it.

object
code
required
Code
string
context
required
Context
string
truncated
required
Truncated

The fields this body cut or emptied to stay under 256 KB (empty: nothing was cut; the API has them whole): first extracted_text (null), then links and codes (empty), then subject, from and to (shortened). HTML and headers are never in a webhook body and are not listed.

Array<string>
Allowed values: text extracted_text html extracted_html links codes subject from to

Example

{
"event_id": "evt_01je56wqswfmn9pgbc1wq8tjgq",
"event_type": "message.received",
"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": "test@k7m2xq4p.yoagent.email",
"envelope_from": "bounce@example.com",
"plus_tag": null,
"from": [
{
"name": "Example App",
"address": "noreply@example.com"
}
],
"to": [
{
"name": "",
"address": "test@k7m2xq4p.yoagent.email"
}
],
"subject": "Your sign-in code",
"preview": "Your sign-in code is 482913.",
"labels": [
"received",
"unread"
],
"size": 66000,
"received_at": "2026-12-01T12:00:00Z",
"extracted_text": "Your sign-in code is 482913.",
"links": [
{
"url": "https://example.com/sign-in?code=482913",
"text": "Sign in",
"kind": "verify"
}
],
"codes": [
{
"code": "482913",
"context": "Your sign-in code is 482913."
}
],
"truncated": []
}
}

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