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 { id, created_at, object, 3 more }
GET
/chatkit/threads/{thread_id}

Retrieve a ChatKit thread by its identifier.

Parameters
thread_id: String
Returns
class ChatKitThread { id, created_at, object, 3 more }

Represents a ChatKit thread and its current status.

id: String

Identifier of the thread.

created_at: Integer

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

formatunixtime
object: :"chatkit.thread"

Type discriminator that is always chatkit.thread.

status: Active{ type} | Locked{ reason, type} | Closed{ reason, type}

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

title: String

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

user: String

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

Retrieve a ChatKit thread

require "openai"

openai = OpenAI::Client.new

chatkit_thread = openai.beta.chatkit.threads.retrieve("cthr_123")

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