curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/response/thread-analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"orgId": "string",
"agentId": "string",
"limit": 20,
"includeThreads": true,
"sampleLimit": 5,
"range": "string"
}'
{
"ok": true,
"generatedAt": "2026-08-31T14:22:05Z",
"orgId": "string",
"agentId": "string",
"limit": 20,
"range": "string",
"since": "2026-08-31T14:22:05Z",
"possiblyTruncated": true,
"analysis": {},
"nextSteps": [
"string"
]
}
Same as GET /api/response/thread-analytics with parameters in the body
Widget identity is verified when signing is configured; tokenless compatibility does not establish tenant ownership…
POST
/
api
/
response
/
thread-analytics
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/response/thread-analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"orgId": "string",
"agentId": "string",
"limit": 20,
"includeThreads": true,
"sampleLimit": 5,
"range": "string"
}'
{
"ok": true,
"generatedAt": "2026-08-31T14:22:05Z",
"orgId": "string",
"agentId": "string",
"limit": 20,
"range": "string",
"since": "2026-08-31T14:22:05Z",
"possiblyTruncated": true,
"analysis": {},
"nextSteps": [
"string"
]
}
Widget identity is verified when signing is configured; tokenless compatibility does not establish tenant ownership. See the authentication and recovery guide for credential and retry rules.
Request body
object
Response
ThreadAnalyticsReport
Output of
analyzeThreadResponseAnalytics (src/server/threadAnalytics.js): includes singleResponseReasons, multiResponseReasons, daily, pairCountDistribution and, with includeThreads=true, sampled threads. Exact shape is not fixed here.Status codes
| Code | Meaning |
|---|---|
200 | Thread analytics report |
400 | Bad range, or analytics could not run |
401 | Widget token missing, malformed, expired, from the future, or badly signed |
403 | Request org/agent disagrees with the widget token claims |
429 | Too many requests for this IP (scoped by verified org/agent) |
500 | Unhandled error |
502 | Responses store query failed |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/response/thread-analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"orgId": "string",
"agentId": "string",
"limit": 20,
"includeThreads": true,
"sampleLimit": 5,
"range": "string"
}'
{
"ok": true,
"generatedAt": "2026-08-31T14:22:05Z",
"orgId": "string",
"agentId": "string",
"limit": 20,
"range": "string",
"since": "2026-08-31T14:22:05Z",
"possiblyTruncated": true,
"analysis": {},
"nextSteps": [
"string"
]
}
Last modified on November 13, 2026