List All Project Consumer Chats
Retrieve all chat conversations for a specific consumer within your project. This endpoint allows you to filter and view all chats associated with a particular consumer ID.
Endpoint
/listAllProjectConsumerChats
https://chat-api.atriai.chat/listAllProjectConsumerChats
Authentication
Query Parameters
The following query parameters can be included in the URL:
URL Query Parameters
The unique identifier for the consumer whose chats you want to retrieve
Validation Rules
The following validation rules apply to the request:
consumer_id is required
A valid consumer_id must be provided as a query parameter
Valid API key required
A valid project-specific API key must be provided in the Authorization header
Consumer must belong to project
Only chats for consumers that belong to the authenticated project will be returned
Response Schema
The API returns a JSON object with the following structure:
Array of chat objects specific to the requested consumer
Unique identifier for the chat conversation
Consumer identifier (matches the requested consumer_id)
ISO timestamp when the chat was created
ISO timestamp when the chat was last updated
The consumer ID that was queried
Total number of chats for this consumer
Use Cases
Common scenarios where this endpoint is useful:
- Customer support: View all conversations with a specific user
- User-specific analytics and conversation history
- Debugging issues for a particular consumer
- Personalized dashboard showing user's chat history
- Compliance and audit trails for specific users
- Data export for individual consumer records
Usage Examples
Common usage patterns for the List All Project Consumer Chats endpoint:
Get Consumer's Chats
Retrieve all chats for a specific consumer
https://chat-api.atriai.chat/listAllProjectConsumerChats?consumer_id=user_12345
Response Example
Example response for a successful request:
{ "chats": [ { "id": "chat_20240711_143052_abc123", "consumer_id": "user_12345", "created_at": "2024-07-11T14:30:52.123Z", "last_updated_at": "2024-07-11T14:35:21.456Z" }, { "id": "chat_20240712_090015_xyz789", "consumer_id": "user_12345", "created_at": "2024-07-12T09:00:15.789Z", "last_updated_at": "2024-07-12T09:25:33.321Z" } ], "consumer_id": "user_12345", "total_count": 2 }
Try it out
Select a language to see how to make a request to the AI Chat API
curl -L 'https://chat-api.atriai.chat/listAllProjectConsumerChats?consumer_id=your_consumer_id_here' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_API_KEY'
API Key Required
Replace YOUR_API_KEY
with your actual api key to authenticate requests.