Skip to content

List Threads

GET
/v0/threads
curl -s "https://api.yoagent.dev/v0/threads" \
-H "Authorization: Bearer $YOAGENT_KEY"

List threads of all inboxes, newest first; inbox_id narrows it to one inbox.

limit
Limit
integer
default: 20 >= 1 <= 100

How many items a page holds.

page_token
Page Token
Any of:

The next_page_token of the previous page

string

The previous page’s next_page_token, for the page after it; omitted: the first page.

inbox_id
Inbox Id
Any of:

Inbox id (inb_…), address or *@domain (the catch-all)

string

Only this inbox’s threads: its id, address or *@domain (the catch-all).

search
Search
Any of:

Words to find in mail, all of them: in the subject, body, names, addresses and file names (or between words, -word to leave out; quotes do not make a phrase)

string
>= 1 characters <= 200 characters

Threads with a message that matches.

Successful Response

Media typeapplication/json
ThreadList

A page of threads.

object
count
required
Count
integer
next_page_token
required
Next Page Token
Any of:
string
threads
required
Threads
Array<object>
ThreadItem

A thread in a list or after a change: no messages.

object
version
required
Version

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

integer
thread_id
required
Thread Id
string
/^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$/
inbox_id
required
Inbox Id
string
/^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$/
subject
required
Subject
Any of:
string
labels
required
Labels
Array<string>
message_count
required
Message Count
integer
last_message_at
required
Last Message At
string format: date-time

Example

{
"count": 1,
"next_page_token": null,
"threads": [
{
"version": 1,
"thread_id": "thr_01je56wqswfmn9pgbc1wq8tjgq",
"inbox_id": "inb_01je56wqswfmn9pgbc1wq8tjgq",
"subject": "Your sign-in code",
"labels": [
"received",
"unread"
],
"message_count": 1,
"last_message_at": "2026-12-01T12:00:00Z"
}
]
}

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.