v1
latestOpenAPI 3.0.02026-07-174565114.3 KBv1
Get thread with messages
Get a thread by ID with all its messages. The thread must belong to the authenticated project.
get/v1/threads/{threadId}
Path parameters
threadIdstring required
Example:thr_abc123xyz
Thread ID
Query parameters
userKeystring
Optional user key for thread organization
Response
Thread with messages
Example response
{
"id": "thr_abc123xyz",
"runStatus": "idle",
"lastRunError": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"createdAt": "2024-01-15T12:00:00Z",
"updatedAt": "2024-01-15T12:05:00Z",
"messages": [
{
"id": "msg_abc123xyz",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello, world!"
}
],
"createdAt": "2024-01-15T12:00:00Z"
}
]
}