A thread groups inbound messages whose In-Reply-To (or any References header) matches the Message-ID of an earlier inbound message in the same agent. Each new conversation starts a fresh thread.
in_reply_to / references to find a matching parent. Tracked in sendook-sjq.GET/agents/:id/threads/:threadId| Parameter | Type | Description |
|---|---|---|
id | string | 12 lowercase alphanumeric chars (the agent id). |
threadId | string (uuid) | Thread id returned in any list-messages row. |
200 OK{
"thread": {
"id": "8b1f...uuid",
"subject": "Question about pricing",
"created_at": 1730000000,
"last_activity_at": 1730000300
},
"messages": [
{
"id": "uuid-1",
"direction": "inbound",
"from_addr": "alice@example.com",
"to_addr": "abc123def456@agents.yourdomain.com",
"subject": "Question about pricing",
"message_id_header": "<msg1@example.com>",
"in_reply_to": null,
"body_text": "What's the enterprise tier look like?",
"body_html": null,
"raw_size": 612,
"status": "received",
"created_at": 1730000000
},
{
"id": "uuid-2",
"direction": "inbound",
"from_addr": "alice@example.com",
"to_addr": "abc123def456@agents.yourdomain.com",
"subject": "Re: Question about pricing",
"message_id_header": "<msg2@example.com>",
"in_reply_to": "<msg1@example.com>",
"body_text": "Just to clarify what I meant...",
"body_html": null,
"raw_size": 720,
"status": "received",
"created_at": 1730000300
}
]
}
messages is ordered by created_at ascending (oldest first). last_activity_at updates each time a new message joins the thread.
401 — missing or invalid bearer.403 — per-agent key for a different agent.404 — agent unknown / tombstoned, or threadId doesn't exist for this agent.