List Messages
GET
/v0/messages
curl -s "https://api.yoagent.dev/v0/messages" \ -H "Authorization: Bearer $YOAGENT_KEY"const response = await fetch("https://api.yoagent.dev/v0/messages", { headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, },});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.get( "https://api.yoagent.dev/v0/messages", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, timeout=60,)response.raise_for_status()data = response.json()List messages of all inboxes, newest first, with filters; project_id narrows it to one project,
inbox_id to one inbox.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
Limit
integer
How many items a page holds.
page_token
project_id
inbox_id
labels
Labels
Array<string>
Messages that carry all of these.
exclude_labels
Exclude Labels
Array<string>
Messages that carry none of these (received without unread: the Read folder).
search
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MessageList
A page of messages.
object
count
required
Count
integer
messages
required
Messages
Array<object>
MessageItemA 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
project_id
required
Project Id
string
inbox_id
required
Inbox Id
string
thread_id
required
Thread Id
string
envelope_to
required
envelope_from
required
Envelope From
string
from
required
From
Array<object>
PartyA name and address from a header.
object
name
required
Name
string
address
required
Address
string
to
required
To
Array<object>
PartyA name and address from a header.
object
name
required
Name
string
address
required
Address
string
labels
required
Labels
Array<string>
size
required
Size
integer
received_at
required
Received At
string format: date-time
Example
{ "count": 1, "next_page_token": null, "messages": [ { "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" } ]}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.