API Documentation
Prospects
Agents
VoiceModels
Hive
HiveAgentLink
Actions
ActionAgentLink
Products
Conversations
ConversationProspectLink
Analytics
Get Metrics
Get fine grained analytics data from Trata AI like call, duration stats, etc.
POST
/
v1
/
metrics
Copy
curl --request POST \
--url https://api.trata.ai/v1/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"requests": [
{
"id": "<string>",
"name": "CALLS",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"aggregationPeriod": "MONTHLY",
"aggregationFormula": "COUNT"
}
]
}'
Copy
{
"responses": [
{
"id": "<string>",
"name": "CALLS",
"datapoints": [
{
"timestamp": "2023-12-25",
"value": "<string>"
}
]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
Copy
curl --request POST \
--url https://api.trata.ai/v1/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"requests": [
{
"id": "<string>",
"name": "CALLS",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"aggregationPeriod": "MONTHLY",
"aggregationFormula": "COUNT"
}
]
}'
Copy
{
"responses": [
{
"id": "<string>",
"name": "CALLS",
"datapoints": [
{
"timestamp": "2023-12-25",
"value": "<string>"
}
]
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.