Skip to main content

Get Chats by Configuration ID

Retrieves a paginated list of all chat sessions associated with your API Key (your configuration).

Endpoint

GET /chats/by-config-id

Query Parameters

NameRequiredDefaultDescription
limitNo10Number of chats to return
offsetNo0Number of chats to skip

Headers

NameRequiredDescription
X-API-KeyYesYour unique API Key provided by ZeroinAI

Response

Success Response (200 OK)

{
"items": [
{
"chat_id": "chat-id-1",
"created_at": "2023-10-28T14:30:00Z",
"agent_name": "Support Pro Agent",
"creator_company_name": "Your Company Inc.",
"token_limit": 1000.0,
"token_used": 150.0,
"deleted": false,
"messages": []
},
{
"chat_id": "chat-id-2",
"created_at": "2023-10-28T15:00:00Z",
"agent_name": "Support Pro Agent",
"creator_company_name": "Your Company Inc.",
"token_limit": 500.0,
"token_used": 80.0,
"deleted": false,
"messages": []
}
],
"total": 2,
"limit": 10,
"offset": 0
}

Error Responses

Status CodeDescription
401 UnauthorizedInvalid or missing API Key
404 Not FoundChat configuration associated with the API Key not found

Example Request

curl -X GET 'https://api.zeroinai.com/micro-apps/for-api-providers/chat-service/chats/by-config-id?limit=10&offset=0' \
-H 'X-API-Key: YOUR_UNIQUE_API_KEY'