Skip to main content
GET
/
backend
/
reports
/
{orgId}
/
chats
/
total
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/chats/total?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z&channel=web&status=1' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "total_chats": 1250
}
This endpoint returns the total count of chat sessions that match the given query parameters. It can be used to analyze chat volume over time, filtered by various attributes such as channel and status.

Authentication

Authorization
string
required
Bearer token for authentication

Path Parameters

orgId
string
required
The ID of the organization

Query Parameters

startDate
string
The start date for the date range filter (ISO 8601 format)
endDate
string
The end date for the date range filter (ISO 8601 format)
channel
string
Filter by the chat channel (e.g., “web”, “mobile”)
status
number
Filter by the chat session status

Response

total_chats
number
The total number of chat sessions matching the specified criteria
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/chats/total?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z&channel=web&status=1' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "total_chats": 1250
}