Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Retrieve a ChatKit thread

beta.chatkit.threads.retrieve(thread_id) -> ChatKitThread
GET
/chatkit/threads/{thread_id}

Retrieve a ChatKit thread by its identifier.

Retrieve a ChatKit thread

from openai import OpenAI

client = OpenAI()
chatkit_thread = client.beta.chatkit.threads.retrieve(
    "cthr_123",
)
print(chatkit_thread.id)
Response example
{
  "id": "cthr_abc123",
  "object": "chatkit.thread",
  "title": "Customer escalation",
  "created_at": 1712345600,
  "status": {
    "type": "active"
  },
  "user": "user_123"
}
Parameters
thread_id: str
Returns
class ChatKitThread: …

Represents a ChatKit thread and its current status.

id: str

Identifier of the thread.

created_at: int

Unix timestamp (in seconds) for when the thread was created.

formatunixtime
object: Literal["chatkit.thread"]

Type discriminator that is always chatkit.thread.

status: Status

Current status for the thread. Defaults to active for newly created threads.

title: Optional[str]

Optional human-readable title for the thread. Defaults to null when no title has been generated.

user: str

Free-form string that identifies your end user who owns the thread.

Returns Examples
Response example
{
  "id": "cthr_abc123",
  "object": "chatkit.thread",
  "title": "Customer escalation",
  "created_at": 1712345600,
  "status": {
    "type": "active"
  },
  "user": "user_123"
}