This endpoint provides chat engagement metrics, including the total number of chats, the number of engaged chats, and the engagement rate.
Authentication
Bearer token for authentication
Path Parameters
The ID of the organization to filter the results
Query Parameters
The start date for the report period (ISO 8601 format)
The end date for the report period (ISO 8601 format)
The channel to filter the results (e.g., “web”, “mobile”)
The status of the chat sessions to include
Response
The total number of chat sessions in the specified period
The number of chat sessions where there was at least one message exchange
The ratio of engaged chats to total chats, expressed as a decimal (0 to 1)
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/chats/engagement?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z&channel=web&status=1' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
"total_chats": 1000,
"engaged_chats": 850,
"engagement_rate": 0.85
}