Retrieve a thread

GET
/v1/inboxes/{inbox_id}/threads/{thread_id}

The conversation with its latest messages, oldest first, each with its text and extracted_text (its own words, without the quoted conversation): what an agent reads before it replies. HTML is the sender's: sanitize it before showing it to anyone.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Path Parameters

inbox_id*string

The inbox's id.

thread_id*string

The thread's id.

Header Parameters

Coss-Version?"2026-10-10"

The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.

Value in"2026-10-10"

Response Body

The thread.

application/json
  1. response
object*"inbox_thread"
Value in"inbox_thread"
id*string
inbox_id*string
subject*|

The first message's subject.

participants*array<string>

Addresses of everyone in the conversation but the inbox (Bcc'd ones never).

message_count*integer
preview*|

The start of the latest message.

last_message_at*string
Formatdate-time
last_inbound_at*|

When its latest inbound message arrived: later than last_message_at's outbound one means the conversation awaits a reply.

Formatdate-time
created_at*string
Formatdate-time
messages*array<>

The thread's messages, oldest first: its latest 50 (see message_count; list the inbox's messages for older ones).

import { Coss } from "coss";const coss = new Coss({  apiKey: process.env.COSS_API_KEY,  baseUrl: "https://api.coss.com",});const { data, error } = await coss.inboxes.threads.get("inbox_01k7c8m4q2f3e9v6t5r1n0p8yz", "thread_01k7c8m4r0c2b8w9y3d5f6g7h8");
{  "object": "inbox_thread",  "id": "thread_01k7c8m4r0c2b8w9y3d5f6g7h8",  "inbox_id": "inbox_01k7c8m4q2f3e9v6t5r1n0p8yz",  "subject": "My order arrived damaged",  "participants": [    "jane@example.com"  ],  "message_count": 2,  "preview": "Sorry about that, Jane! A new one is on its way.",  "last_message_at": "2026-10-10T12:01:00.000Z",  "last_inbound_at": "2026-10-10T12:00:00.000Z",  "created_at": "2026-10-10T12:00:00.000Z",  "messages": [    {      "object": "inbox_message",      "id": "imsg_01k7c8m4s1d3c9x0z4e6g7h8j9",      "inbox_id": "inbox_01k7c8m4q2f3e9v6t5r1n0p8yz",      "thread_id": "thread_01k7c8m4r0c2b8w9y3d5f6g7h8",      "direction": "inbound",      "status": "received",      "from": "Jane Doe <jane@example.com>",      "to": [        "support-agent@k3j9x2m7qp4l.inbound.coss.com"      ],      "cc": [],      "subject": "My order arrived damaged",      "preview": "Hi, the order arrived damaged. Can you send a new one?",      "attachments": [        {          "id": "rcvdatt_01k7c8m4r0c2b8w9y3d5f6g7h8",          "filename": "photo.jpg",          "content_type": "image/jpeg",          "content_id": null,          "disposition": "attachment",          "size": 48213        }      ],      "spam": false,      "received_email_id": "rcvd_01k7c8m4q2f3e9v6t5r1n0p8yz",      "email_id": null,      "created_at": "2026-10-10T12:00:00.000Z",      "reply_to": [],      "message_id": "<CAF3k2m9qp4ld8sv@mail.example.com>",      "in_reply_to": null,      "references": [],      "text": "Hi, the order arrived damaged. Can you send a new one?\n\nJane",      "extracted_text": "Hi, the order arrived damaged. Can you send a new one?\n\nJane",      "html": null,      "truncated": false    },    {      "object": "inbox_message",      "id": "imsg_01k7c8m5t2e4d0y1a5f7h8j9k0",      "inbox_id": "inbox_01k7c8m4q2f3e9v6t5r1n0p8yz",      "thread_id": "thread_01k7c8m4r0c2b8w9y3d5f6g7h8",      "direction": "outbound",      "status": "queued",      "from": "\"Acme Support\" <support-agent@k3j9x2m7qp4l.inbound.coss.com>",      "to": [        "jane@example.com"      ],      "cc": [],      "subject": "Re: My order arrived damaged",      "preview": "Sorry about that, Jane! A new one is on its way.",      "attachments": [],      "spam": false,      "received_email_id": null,      "email_id": "email_01k7c8m5t2e4d0y1a5f7h8j9k0",      "created_at": "2026-10-10T12:01:00.000Z",      "reply_to": [],      "message_id": null,      "in_reply_to": "<CAF3k2m9qp4ld8sv@mail.example.com>",      "references": [        "<CAF3k2m9qp4ld8sv@mail.example.com>"      ],      "text": "Sorry about that, Jane! A new one is on its way.",      "extracted_text": "Sorry about that, Jane! A new one is on its way.",      "html": null,      "truncated": false    }  ]}