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
| Name | Required | Default | Description |
|---|---|---|---|
limit | No | 10 | Number of chats to return |
offset | No | 0 | Number of chats to skip |
Headers
| Name | Required | Description |
|---|---|---|
X-API-Key | Yes | Your 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 Code | Description |
|---|---|
| 401 Unauthorized | Invalid or missing API Key |
| 404 Not Found | Chat 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'