List Threads
GEThttps://api.confident-ai.com/v1/threads
Retrieves a list of threads from your Confident AI project.
curl -X GET "https://api.confident-ai.com/v1/threads" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"threads": [
{
"threadId": "thread-123",
"createdAt": "2025-01-15T10:30:00Z",
"lastActivity": "2025-01-15T11:45:00Z",
"metadata": {
"userId": "user-456"
},
"tags": [
"support"
],
"metricCollectionName": "conversation-metrics",
"totalTraces": 5
}
],
"totalThreads": 100
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Query parameters
pageintegerThis specifies the page number of the threads to return. Defaulted to 1.
pageSizeintegerThis specifies the maximum number of threads per page. Defaulted to 25.
environmentstringThis filters the threads by the environment where the thread was created, and returns threads from all environments if not specified.
startstringThis filters for threads created after the specified start datetime. Defaulted to 30 days ago.
endstringThis filters for threads created before the specified end datetime. Defaulted to the current time.
sortByenumThis determines the field to sort by. Defaulted to
lastActivity.ascendingenumThis determines if the field specified in
sortByshould be in ascending order. Defaults tofalse.
Response
successbooleanThis is true if the threads were successfully retrieved.
dataobjectThis maps to the list of threads retrieved.
Show 2 propertiesHide 2 properties
threadslist of objectsThis is the list of threads retrieved.
Show 7 propertiesHide 7 properties
threadIdstringThis 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.
metadataobjectThis is the custom metadata attached to the thread.
tagslist of stringsThis is the list of tags associated with the thread.
metricCollectionNamestringThis 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 retrieved.
deprecatedbooleanThis is true if this endpoint is deprecated.