List All Threads
List all conversation threads across your project with advanced filtering and pagination options.Query Parameters
Number of threads to skip for pagination (default: 0)
Number of threads to return (default: 50, max: 100)
Sort order for results (default: “desc”)
asc- Ascending order (oldest first)desc- Descending order (newest first)
Filter threads by user ID
Filter threads by external reference identifier
Filter threads by agent ID
Start date filter (ISO 8601 format, e.g., “2024-01-01”)
End date filter (ISO 8601 format, e.g., “2024-01-31”)
Response
Total number of threads matching the criteria
Whether more results are available
Cursor for the next page of results
Cursor for the previous page of results
Array of thread objects with messages
Create Thread for Agent
Create a new conversation thread for a specific agent.Path Parameters
The unique identifier of the agent
Request Body
External reference identifier for integration tracking
Response
Returns the created thread object.Thread unique identifier
ID of the agent handling this thread
ID of the user who created this thread
External reference identifier
Thread title
When the thread was created (ISO 8601 format)
When the thread was last updated (ISO 8601 format)
List Agent Threads
List all conversation threads for a specific agent.Path Parameters
The unique identifier of the agent
Query Parameters
Number of threads to skip (default: 0)
Number of threads to return (default: 50)
Sort order for results (default: “desc”)
Response
Total number of threads for this agent
Whether more results are available
Cursor for the next page
Cursor for the previous page
Array of thread objects (without messages)
Get Thread with Messages
Get detailed information about a specific thread including all messages.Path Parameters
The unique identifier of the agent
The unique identifier of the thread
Response
Returns the complete thread object with all messages and conversation history.Chat Session Threads
Create Thread from Chat Session
Create a new thread within a chat session context.Path Parameters
The unique identifier of the chat session
Response
Returns the created thread object within the chat session context.List Chat Session Threads
List all threads within a specific chat session.Path Parameters
The unique identifier of the chat session
Response
Returns an array of thread objects associated with the chat session.Get Thread from Chat Session
Get a specific thread within a chat session context.Path Parameters
The unique identifier of the chat session
The unique identifier of the thread
Delete Thread from Chat Session
Delete a specific thread from a chat session.Path Parameters
The unique identifier of the chat session
The unique identifier of the thread to delete
Response
Returns a confirmation of thread deletion.Invoke Thread from Chat Session
Send a message to an agent through a chat session thread.Path Parameters
The unique identifier of the chat session
The unique identifier of the thread
Request Body
The message/prompt to send to the agent
Array of tool IDs to enable for this specific interaction
Response
Returns the agent’s response and any tool results.Thread Management Best Practices
1
Thread Organization
Use meaningful external references to track threads across your application
2
Message History
Regularly retrieve thread messages to maintain conversation context
3
Session Management
Utilize chat sessions for temporary or anonymous user interactions
4
Cleanup Strategy
Implement thread lifecycle management to remove old or inactive conversations
5
Performance
Use pagination when listing threads to avoid performance issues
Thread Lifecycle
Creation
Threads are created automatically when users start conversations or manually via API
Active State
Threads remain active while users exchange messages with agents
Persistence
All messages and context are preserved throughout the thread lifetime
Cleanup
Implement cleanup policies based on age, activity, or business requirements
External Reference Patterns
Message Types and Structure
Text Messages
Text Messages
Standard text-based conversations between users and agents
Tool Messages
Tool Messages
Messages containing tool calls and results
Media Messages
Media Messages
Messages containing images, documents, or other media
Filtering and Search
Advanced Filtering Options:
- Filter by date range to find recent conversations
- Filter by agent to analyze specific agent performance
- Filter by external reference for integration lookup
- Filter by user for customer support scenarios
- Combine filters for precise thread discovery