This endpoint is used to retrieve chat threads of an agent. It defaults to retrieving chat threads with call source if include_call_threads is not provided.
Staging behaviour:
- Pass
agent_version=staging as a query parameter to retrieve chat threads for the staging version instead of the published agent's.
Path Parameters:
- agent_id: ID of the agent whose chat threads are to be retrieved
Query Parameters:
- include_call_threads: Optional query parameter to include chat threads with call source (defaults to False)
- query_source: Repeated query param to include non-call sources (e.g., ?query_source=web&query_source=).
"call" here is ignored and controlled only by include_call_threads.
- paginated (boolean, optional): Toggle between paginated or full results (defaults to False).
Accepted values: true, false.
- page (int, optional): Page number to retrieve (defaults to 1, min 1).
Only applicable when paginated=true.
- items_per_page (int, optional): Number of items per page (defaults to 20, min 1, max 100).
Only applicable when paginated=true.
Returns:
- If paginated=false: A JSON response with chat_threads list.
- If paginated=true: A JSON response with count, num_pages, current_page, and chat_threads.
- If agent does not exist, returns 404.
Current Version: