Skip to main content

List Chats

This endpoint retrieves a list of chats within a specific assistant session in TaskingAI.

Endpoint

  • Method: GET
  • URL: https://api.tasking.ai/v1/assistants/{assistant_id}/chats

Path Parameters

ParameterTypeDescription
assistant_idstringThe unique identifier for the assistant.

Header Parameters

All TaskingAI API requests require the following headers:

HeaderTypeDescription
Content-TypestringThe content type of the request. Set to application/json.
AuthorizationstringAPI key for authorization in the format Bearer $TASKINGAI_API_KEY. The key can be obtained in the project settings in your TaskingAI console.

Query Parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20The maximum number of chats to retrieve.
orderstring or nullNodescDefines the sort order. Can accept values from asc or desc. The sort key is updated_timestamp.
afterstring or nullNonullA cursor indicating to retrieve chats after a certain identifier.
beforestring or nullNonullA cursor indicating to retrieve chats before a certain identifier.

Response Example

{
"status": "success",
"data": [
{
"object": "Chat",
"chat_id": "chat_1",
"assistant_id": "assistant_1",
"name": "Name",
"metadata": {},
"updated_timestamp": 1730210035453,
"created_timestamp": 1730210035453
},
...
],
"fetched_count": 20,
"has_more": true
}