API Reference
  • 08 May 2025
  • 4 Minutes to read
  • Contributors
  • PDF

API Reference

  • PDF

Article summary

The Daily Conversation Reports API allows authorized clients to retrieve hourly conversation data per tenant in JSON or ZIP format. This is essential for analyzing agent-customer interactions and maintaining performance reporting at scale.


1. Creating an Application

In order to utilize the Daily Conversation Reports API an application with dataservice_external scope must be created. This application enables secure authentication and authorization of client requests.

📄 For setup instructions, please refer to the official guide.


2. Getting an Access Token

To authenticate API requests, an access token mus be obtained using the credentials of your registered application.

📄 For getting an access token, please refer to the official guide.

Important Note

The retrieved token must be included in the Authorization header as a Bearer token in all API requests.


3. Daily Conversation Reports API

Endpoint:

  • Method: GET
  • URL: {{BaseUrl}}/api/external/conversations/daily-report/{{utcDay}}/{{utcHour}}?compressed={{boolean}}

Path Parameters

ParameterTypeDescription
utcDaystringDate in YYYY-MM-DD format (UTC)
utcHournumberHour of the day (0–23, in UTC)

Query Parameters

ParameterTypeDescription
compressedbooleanIf true, returns zipped file. If false, returns raw JSON.

Responses

Status CodeDescription
200OK – report found and returned in requested format successfully
400Bad Request – invalid Date
401Unauthorized – missing or invalid token
403Forbidden – insufficient tenant permissions
404Not Found – report not found (and could not be generated on demand)
500Internal server error


3.1. Example Request & Response

Here's an example of a request:

curl --location '{{BaseUrl}}/api/external/conversations/daily-report/2025-04-20/09?compressed=false' \
--header 'Content-Type: none' \
--header 'Authorization: Bearer {{Token}}'


Here's an example of a response:

{
    "Conversations": [
        {
            "Session": {
                "Id": "0d8eddf9-4bf4-446d-96a1-08dd60764b69",
                "Date": "2025-04-20T09:42:10.4190327Z",
                "ProjectId": "00000000-0000-0000-0000-000000000000",
                "ProjectName": "webchat-logo-demo",
                "ExternalConversationId": "254cf46a-1817-44b7-abe1-252603162dad",
                "ConversationSessionId": "828dcf07-0d7e-4966-9216-e37074ef446d",
                "KnovvuChannelId": "webchat-sestek",
                "ChannelName": null,
                "Duration": 0.0250372,
                "LastIntent": null,
                "AverageSentimentScore": null,
                "SentimentLevel": 2,
                "ConversationSummary": null,
                "CustomerName": "John Doe",
                "CustomerEmailAddress": "john@doe.com",
                "CustomerPhoneNumber": "+906665554433",
                "CustomerId": null,
                "LastRatingScore": null
            },
            "Messages": [
                {
                    "SessionId": "0d8eddf9-4bf4-446d-96a1-08dd60764b69",
                    "Text": "Hello, I am Knovvu Virtual Agent. How may I help you?",
                    "TranslatedText": null,
                    "DateCreated": "2025-03-11T08:30:26.4827277Z",
                    "Type": 0,
                    "Source": 0,
                    "ContentType": 0,
                    "StoragePath": null,
                    "StorageType": null,
                    "RetentionEnabled": null,
                    "JsonContent": "{\"type\":\"message\",\"id\":\"a5b4520d-ff51-486c-9bc3-0b75c5156c8b\",\"serviceUrl\":\"http://cai-webchat/webchat/home/push\",\"channelId\":\"webchat-sestek\",\"from\":{\"id\":\"254cf46a-1817-44b7-abe1-252603162dad\",\"name\":\"254cf46a-1817-44b7-abe1-252603162dad\",\"properties\":{}},\"conversation\":{\"id\":\"254cf46a-1817-44b7-abe1-252603162dad\"},\"recipient\":{\"name\":\"John Doe\",\"properties\":{}},\"text\":\"Hello, I am Knovvu Virtual Agent. How may I help you?\",\"attachments\":[],\"channelData\":{\"IsSynchronizer\":false,\"HasExternalAudioContent\":false,\"SrConfidence\":null,\"CustomProperties\":{},\"CustomAction\":null,\"CustomActionData\":null,\"ProjectName\":\"webchat-logo-demo\",\"ResponseType\":0,\"EndUser\":{\"Name\":null,\"Phone\":null,\"Email\":null,\"Twitter\":null,\"Id\":null}}}",
                    "TranslatedJsonContent": null,
                    "TranslationStatus": null,
                    "SrConfidence": null,
                    "SentimentScore": null,
                    "Language": "EN",
                    "HasRecognitionAmbiguity": null,
                    "FlowName": "Main",
                    "FlowType": 0,
                    "HasPrerecordedAudio": false,
                    "MimeType": null,
                    "Session": null,
                    "Recognitions": [],
                    "ExtractedNamedEntities": [],
                    "AmbiguousIntents": [],
                    "MessageAttachments": [],
                    "Id": "00000000-0000-0000-0000-000000000000"
                },
                {
                    "SessionId": "0d8eddf9-4bf4-446d-96a1-08dd60764b69",
                    "Text": "Your session has been terminated.",
                    "TranslatedText": null,
                    "DateCreated": "2025-03-11T08:45:40.0017884Z",
                    "Type": 2,
                    "Source": 0,
                    "ContentType": 0,
                    "StoragePath": null,
                    "StorageType": null,
                    "RetentionEnabled": null,
                    "JsonContent": "{\"type\":\"endOfConversation\",\"text\":\"Your session has been terminated.\"}",
                    "TranslatedJsonContent": null,
                    "TranslationStatus": null,
                    "SrConfidence": null,
                    "SentimentScore": null,
                    "Language": "EN",
                    "HasRecognitionAmbiguity": null,
                    "FlowName": "Main",
                    "FlowType": 0,
                    "HasPrerecordedAudio": false,
                    "MimeType": null,
                    "Session": null,
                    "Recognitions": [],
                    "ExtractedNamedEntities": [],
                    "AmbiguousIntents": [],
                    "MessageAttachments": [],
                    "Id": "00000000-0000-0000-0000-000000000000"
                }
            ],
            "Ratings": []
        },
        {
            "Session": {
                "Id": "311a789d-2a9c-4260-96a2-08dd60764b69",
                "Date": "2025-04-20T09:48:10.4190327Z",
                "ProjectId": "00000000-0000-0000-0000-000000000000",
                "ProjectName": "webchat-logo-demo",
                "ExternalConversationId": "4281c16e-6e7a-474e-adb3-7fed17b6aa48",
                "ConversationSessionId": "e838313c-74d9-4ced-8370-2e8c3059b23a",
                "KnovvuChannelId": "TestChat",
                "ChannelName": null,
                "Duration": 0.1965116,
                "LastIntent": null,
                "AverageSentimentScore": null,
                "SentimentLevel": 2,
                "ConversationSummary": null,
                "CustomerName": null,
                "CustomerEmailAddress": null,
                "CustomerPhoneNumber": null,
                "CustomerId": null,
                "LastRatingScore": null
            },
            "Messages": [
                {
                    "SessionId": "311a789d-2a9c-4260-96a2-08dd60764b69",
                    "Text": "Hello, I am Knovvu Virtual Agent. How may I help you?",
                    "TranslatedText": null,
                    "DateCreated": "2025-03-11T09:48:10.6155443Z",
                    "Type": 0,
                    "Source": 0,
                    "ContentType": 0,
                    "StoragePath": null,
                    "StorageType": null,
                    "RetentionEnabled": null,
                    "JsonContent": "{\"type\":\"message\",\"id\":\"cbb069d6-6861-42d7-8db0-888300a413c6\",\"serviceUrl\":\"http://cai-webchat/webchat/home/push\",\"channelId\":\"TestChat\",\"from\":{\"id\":\"4281c16e-6e7a-474e-adb3-7fed17b6aa48\",\"name\":\"4281c16e-6e7a-474e-adb3-7fed17b6aa48\",\"properties\":{}},\"conversation\":{\"id\":\"4281c16e-6e7a-474e-adb3-7fed17b6aa48\"},\"recipient\":{\"id\":\"555\",\"properties\":{}},\"text\":\"Hello, I am Knovvu Virtual Agent. How may I help you?\",\"attachments\":[],\"channelData\":{\"IsSynchronizer\":false,\"HasExternalAudioContent\":false,\"SrConfidence\":null,\"CustomProperties\":{},\"CustomAction\":null,\"CustomActionData\":null,\"ProjectName\":\"webchat-logo-demo\",\"ResponseType\":0,\"EndUser\":{\"Name\":null,\"Phone\":null,\"Email\":null,\"Twitter\":null,\"Id\":null}}}",
                    "TranslatedJsonContent": null,
                    "TranslationStatus": null,
                    "SrConfidence": null,
                    "SentimentScore": null,
                    "Language": null,
                    "HasRecognitionAmbiguity": null,
                    "FlowName": "Main",
                    "FlowType": 0,
                    "HasPrerecordedAudio": false,
                    "MimeType": null,
                    "Session": null,
                    "Recognitions": [],
                    "ExtractedNamedEntities": [],
                    "AmbiguousIntents": [],
                    "MessageAttachments": [],
                    "Id": "00000000-0000-0000-0000-000000000000"
                },
                {
                    "SessionId": "311a789d-2a9c-4260-96a2-08dd60764b69",
                    "Text": "Your session has been terminated.",
                    "TranslatedText": null,
                    "DateCreated": "2025-03-11T09:48:12.7173435Z",
                    "Type": 2,
                    "Source": 0,
                    "ContentType": 0,
                    "StoragePath": null,
                    "StorageType": null,
                    "RetentionEnabled": null,
                    "JsonContent": "{\"type\":\"endOfConversation\",\"text\":\"Your session has been terminated.\"}",
                    "TranslatedJsonContent": null,
                    "TranslationStatus": null,
                    "SrConfidence": null,
                    "SentimentScore": null,
                    "Language": null,
                    "HasRecognitionAmbiguity": null,
                    "FlowName": "Main",
                    "FlowType": 0,
                    "HasPrerecordedAudio": false,
                    "MimeType": null,
                    "Session": null,
                    "Recognitions": [],
                    "ExtractedNamedEntities": [],
                    "AmbiguousIntents": [],
                    "MessageAttachments": [],
                    "Id": "00000000-0000-0000-0000-000000000000"
                }
            ],
            "Ratings": []
        }
    ],
    "Metadata": {
        "SessionCount": 2,
        "UtcDate": "2025-04-20",
        "Current": "{{BaseUrl}}/api/external/conversations/daily-report/2025/04/20/9?compressed=False",
        "Next": "{{BaseUrl}}/api/external/conversations/daily-report/2025/04/20/10?compressed=False",
        "Previous": "{{BaseUrl}}/api/external/conversations/daily-report/2025/04/20/8?compressed=False"
    }
}

3.2. Metadata Field of the Response

FieldDescription
SessionCountTotal number of conversation sessions recorded within the specified hour.
UtcDateThe UTC date associated with the report (in yyyy-MM-dd format).
CurrentFull URL for the current report being viewed, including the specified date and hour.
NextURL to the next hour's report (e.g., hour + 1). Useful for pagination or looping.
PreviousURL to the previous hour's report (e.g., hour - 1). Allows easy navigation to the previous time window.

3.3. Necessary References for the Response

These enumerations define the possible values returned in the conversation report response, helping to interpret various metadata fields correctly.

SentimentLevel represents the sentiment detected in a message:

ValueLabel
0VeryNegative
1Negative
2Neutral
3Positive
4VeryPositive


Type classifies the type of message exchanged:

ValueLabel
0Reply
1Utterance
2Event


MessageSource indicates the origin of the message:

ValueLabel
0VirtualAgent
1LiveChat


MessageContentType defines the format of the message content:

ValueLabel
0Text
1Audio
2Location
3QuickReply
4Cards
5File


FlowType specifies the type of conversation flow that the message belongs to:

ValueLabel
0Main
1Survey
2SubFlow
3FallbackSR
4Action
5PostSessionFlow
6ToolFlow

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.