Get Thread
GET
/v0/threads/{thread_id}
curl -s "https://api.yoagent.dev/v0/threads/thr_01je56wqswfmn9pgbc1wq8tjgq" \ -H "Authorization: Bearer $YOAGENT_KEY"const response = await fetch("https://api.yoagent.dev/v0/threads/thr_01je56wqswfmn9pgbc1wq8tjgq", { 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/threads/thr_01je56wqswfmn9pgbc1wq8tjgq", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, timeout=60,)response.raise_for_status()data = response.json()Get a thread with its messages, oldest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”thread_id
required
Thread Id
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
ThreadOut
A thread fetched alone: with its messages, oldest first (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
thread_id
required
Thread Id
string
inbox_id
required
Inbox Id
string
labels
required
Labels
Array<string>
message_count
required
Message Count
integer
last_message_at
required
Last Message At
string format: date-time
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
{ "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", "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.