List Threads
GEThttps://api.confident-ai.com/v2/threads
Lists the threads in your Confident AI project one page at a time, most recently active first by default. Filter by environment and time window, and pass nextCursor back as cursor for the next page. Each thread is returned as a summary; retrieve a thread by id for its traces, evaluation results and annotations.
curl -X GET "https://api.confident-ai.com/v2/threads" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"threads": [
{
"id": "thread-42",
"createdAt": "2025-01-15T10:30:00.000Z",
"lastActivity": "2025-01-15T11:45:00.000Z",
"metadata": {
"client": "acme-corp",
"agentId": "geography-agent"
},
"tags": [
"vip"
],
"labels": {
"intent": {
"label": "geography",
"reason": "The user asks for the capital cities of several countries."
}
},
"metricCollectionName": "Conversation Collection Name",
"totalTraces": 2
}
],
"totalThreads": 1,
"nextCursor": null
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Query parameters
pageSizeintegerdefault: 25The number of results per page, at most 100. Defaults to 25.
cursorstringThis is used for pagination, and should be set to the
nextCursorvalue returned in the previous response to get the next page of results.startstringThis filters for results created at or after the specified start datetime, in ISO 8601 format. Defaults to 60 days ago.
endstringThis filters for results created before the specified end datetime, in ISO 8601 format. Defaults to the current time.
ascendingenumdefault: falseThis determines if the field specified in
sortByshould be in ascending order. Defaults tofalse, which returns the newest results first.sortByenumdefault: lastActivityThis determines the field to sort by. Defaults to
lastActivity.environmentenumThis filters the threads by the environment where their traces were created, and returns threads from all environments if not specified.
Response
List Threads succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 3 propertiesHide 3 properties
threadslist of objectsThis is the list of threads for the current page.
Show 8 propertiesHide 8 properties
idstringThis is the thread id you supplied when creating the thread.
createdAtstringThis is when the thread was created.
lastActivitystringThis is when the thread was last active.
metadataobject | nullThis is the custom metadata attached to the thread.
tagsarray | nullThis is the list of tags associated with the thread.
labelsobjectThe labels your project's classifiers assigned to the thread, keyed by classifier name.
metricCollectionNamestring | nullThis is the name of the metric collection assigned to evaluate the thread.
totalTracesintegerThis is the total number of traces in this thread.
totalThreadsintegerThis is the total number of threads matching the query across all pages. Present on the first page only; omitted when a
cursoris given.nextCursorstring | nullThe value to pass as
cursorto get the next page, or null when this is the last page.
deprecatedbooleanIndicates if this endpoint is deprecated.