Retrieve SUVA Analytics Data Through APIs
Use the SUVA Analytics APIs to get conversation interactions, response feedback, session feedback, and weekly user trends.
Important Note: A single request can cover a maximum period of 6-month (183 days). Paginated endpoints return no more than 100 records per page unless a lower limit is specified.
The SUVA Analytics APIs provide programmatic access to analytics data for a specified UID (the unique identifier of your SUVA agent) and reporting period. All analytics endpoints use the POST method and require a valid OAuth access token.
| Endpoint | Path | Returns |
| Interaction data | /interaction-data | Conversation details and chat transcripts |
| Response feedback | /response-feedback | Positive or negative feedback submitted for individual responses |
| Chat session feedback | /session-feedback | Ratings and comments submitted for complete chat sessions |
| Weekly user trends | /weekly-user-trends | Users and their conversation IDs grouped by week |
Before You Begin
Complete the following setup before calling an analytics endpoint.
-
Create an API Client
Refer to this doc to know how to create an API client - Create a New API App.
Note: While creating the API client, select Suva in the Scope field.
-
Generate an Access Token
Encode the client ID and client secret as a Base64 string in the format client_id:client_secret, and submit a client credentials request to the OAuth token endpoint. Replace {{hostname}} with your SearchUnify instance URL.
curl --location 'https://{{hostname}}/oauth/token' \ --header 'Authorization: Basic <base64_client_id_and_secret>' \ --header 'Cache-Control: no-cache' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials'Token validity: An access token is valid for four hours. Generate a new token after it expires.
-
Identify the Base URL
Use the hostname of your SearchUnify instance URLin the following base URL:
https://{{hostname}}/suva/api/v2_suvaAppend the endpoint path shown in each section to construct the complete request URL.
Common Request Requirements
| Requirement | Value |
| HTTP method | POST |
| Authorization | Bearer <access_token> |
| Content type | application/json |
| Date format | YYYY-MM-DD |
| Maximum date range | 183 days |
| Maximum page size | 100 records for paginated data endpoints |
The start_date and the end_date values are inclusive. For example, if the start_date is 2026-06-01, then the data for June 1 is included. Similarly, if the end_date is 2026-06-30, then the data for June 30 is included. Use offset and limit to retrieve paginated results where supported.
Retrieve Interaction Data
| POST | /interaction-data |
Returns the conversation-level interaction data, including the chat transcript, for the specified UID and date range.
Request Body
| Parameter | Required | Description | Type |
| start_date | Yes | Start of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| end_date | Yes | End of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| uid | Yes | UID of the SUVA agent whose interaction data is to be retrieved. | string |
| lang | Yes | Language code for the requested data, for example en. | string |
| offset | Yes | Page number to retrieve. For example, 5 returns the fifth page. | integer |
| limit | No | Maximum number of records to return. Default: 100. | integer |
Example Request
curl --location 'https://{{hostname}}/suva/api/v2_suva/interaction-data' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--header 'original-url: /api/v2_suva/interaction-data' \
--data '{
"uid": "a60987db-a2f7-4c23-b21b-3aea75181099",
"start_date": "2024-08-06",
"end_date": "2024-11-12",
"offset": 1,
"lang": "en",
"limit": 100
}'
Sample Response
{
"data": {
"conversation_report": [
{
"conversation_id": "2024102211100261",
"session_id": "2024102211100261",
"email": "user@example.com",
"status": "Abandoned",
"handover_id": "",
"last_modified": "2024-10-23 05:52:02",
"chat_transcript": "Conversation transcript goes here"
},
{
"conversation_id": "2024145242110061",
"session_id": "2024124321110021",
"email": "another.user@example.com",
"status": "Abandoned",
"handover_id": "",
"last_modified": "2024-10-23 06:12:02",
"chat_transcript": "Conversation transcript goes here"
}
],
"page": 1,
"total_page": 5
},
"message": "Interaction Data Sent Successfully",
"status_code": "200"
}
Retrieve Response Feedback
| POST | /response-feedback |
Returns the positive and negative feedback submitted by users for individual SUVA responses within the specified date range.
Request Body
| Parameter | Required | Description | Type |
| start_date | Yes | Start of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| end_date | Yes | End of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| uid | Yes | UID of the SUVA agent whose session data is to be retrieved. | string |
| lang | Yes | Language code for the requested data, for example en. | string |
| offset | Yes | Page number to retrieve. For example, 5 returns the fifth page. | integer |
| limit | No | Maximum number of records to return. Default: 100. | integer |
Example Request
curl --location 'https://{{hostname}}/suva/api/v2_suva/response-feedback' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--header 'original-url: /api/v2_suva/response-feedback' \
--data '{
"uid": "a60987db-a2f7-4c23-b21b-3aea75181099",
"start_date": "2024-08-06",
"end_date": "2024-11-12",
"offset": 1,
"lang": "en",
"limit": 100
}'
Sample Response
{
"data": {
"feedback_report": [
{
"user_query": "What is SUVA?",
"email": "user@example.com",
"response": "SUVA response goes here",
"feedback_type": "thumbs_up",
"conversation_id": "2024102211100261"
},
{
"user_query": "What is Knowbler?",
"email": "another.user@example.com",
"response": "SUVA response goes here",
"feedback_type": "thumbs_down",
"conversation_id": "2024145611100261"
}
],
"page": 1,
"total_page": 5
},
"message": "Response Feedback Data Sent Successfully",
"status_code": "200"
}
Retrieve Chat Session Feedback
| POST | /session-feedback |
Returns the user feedback submitted for complete chat sessions, including ratings, comments, and the submission date.
Request Body
| Parameter | Required | Description | Type |
| start_date | Yes | Start of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| end_date | Yes | End of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| uid | Yes | UID of the SUVA agent whose session user data is to be retrieved. | string |
| offset | Yes | Page number to retrieve. For example, 5 returns the fifth page. | integer |
| limit | No | Maximum number of records to return. Default: 100. | integer |
Example Request
curl --location 'https://{{hostname}}/suva/api/v2_suva/weekly-user-trends' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--header 'original-url: /api/v2_suva/weekly-user-trends' \
--data '{
"uid": "a60987db-a2f7-4c23-b21b-3aea75181099",
"start_date": "2024-08-06",
"end_date": "2024-11-12"
}'
Sample Response
{
"data": {
"chat_session": [
{
"rating": 4,
"session_id": "2024102211100543",
"feedback_remarks": "",
"comment": "",
"submitted_date": "2024-10-28 06:12:02"
},
{
"rating": 5,
"session_id": "2024102211100261",
"feedback_remarks": "",
"comment": "",
"submitted_date": "2024-11-23 06:12:02"
}
],
"page": 1,
"total_page": 5
},
"message": "Chat Session Data Sent Successfully",
"status_code": "200"
}
Retrieve Weekly User and Conversation Trends
| POST | /weekly-user-trends |
Returns the weekly user activity. Each weekly entry lists users and the conversation IDs associated with them during that week.
Note: This is only available for Zendesk- and Salesforce-powered gated communities.
Request Body
| Parameter | Required | Description | Type |
| start_date | Yes | Start of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| end_date | Yes | End of the reporting period, inclusive. Format: YYYY-MM-DD. | string |
| uid | Yes | UID of the SUVA agent whose weekly data is to be retrieved. | string |
| offset | Yes | Page number to retrieve. For example, 5 returns the fifth page. | integer |
| limit | No | Maximum number of records to return. Default: 100. | integer |
Example Request
curl --location 'https://{{hostname}}/suva/api/v2_suva/weekly-user-trends' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--header 'original-url: /api/v2_suva/weekly-user-trends' \
--data '{
"uid": "a60987db-a2f7-4c23-b21b-3aea75181099",
"start_date": "2024-08-06",
"end_date": "2024-11-12"
}'
Sample Response
{
"data": {
"weekly_trend": [
{
"week_start": "2024-09-01",
"users": [
{
"user_email": "user@example.com",
"conversation_ids": ["conv_id1", "conv_id2"]
},
{
"user_email": "another.user@example.com",
"conversation_ids": ["conv_id3", "conv_id4"]
}
]
},
{
"week_start": "2024-09-08",
"users": [
{
"user_email": "user@example.com",
"conversation_ids": ["conv_id5", "conv_id6"]
}
]
}
],
"page": 1,
"total_page": 5
},
"message": "Weekly Trend Data Sent Successfully",
"status_code": "200"
}
Error Responses
The APIs can return the following response bodies when a request cannot be completed.
Invalid Request Data
{
"data": {},
"message": "Please provide valid data to fetch details",
"status_code": 400
}
Unsupported HTTP Method
{
"data": {},
"message": "Invalid Method Called",
"status_code": 405
}
No Matching Data
{
"data": {},
"message": "Date range must be at least 7 days",
"status_code": 400
}
Invalid Weekly Trend Date Range
The Weekly User and Conversation Trends API requires a date range of at least seven days and no more than 183 days.
{
"data": {},
"message": "Date range must not exceed 183 days",
"status_code": 400
}
Security and Implementation Notes
-
Store client credentials and access tokens in a secure server-side secrets store.
-
Replace all placeholders in the examples before sending a request.
-
Regenerate the access token every four hours or when an authentication request fails because the token has expired.
-
Use pagination to process large result sets and continue requesting pages until page equals total_page.
Last updated: Friday, July 17, 2026