Get Call Counter Metrics for the Organization - Cognigy Documentation
Get Call Counter Metrics for the Organization
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get Call Counter Metrics
Request
GET /v2.0/callcounter
Example cURL Command
curl --request GET \
--url https://api-trial.cognigy.ai/new/v2.0/callcounter \
--header 'X-API-Key: <api-key>'
Example Python Code
import requests
url = "https://api-trial.cognigy.ai/new/v2.0/callcounter"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)
Example JavaScript Code
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api-trial.cognigy.ai/new/v2.0/callcounter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
... (Additional examples omitted for brevity)
Response Codes
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 404: Not Found
- 500: Internal Server Error
Example Error Responses
Bad Request
{
"type": "Bad Request",
"title": "Bad Request Error",
"status": 400,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}
Unauthorized
{
"type": "Unauthorized",
"title": "Unauthorized Error",
"status": 401,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 401,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}
Query Parameters
- year (number, required): The year for which metrics are requested.
- month (number, optional): The month for which metrics are requested.
Response Structure
If successful, the response will contain:
{
"items": [
{
"calls": 123,
"duration": 123,
"concurrentCalls": 123,
"day": 123,
"month": 123,
"year": 123
}
]
}
Authorizations
- X-API-Key: Required to access the API (provide in the HTTP-Header).