Get call stats by campaign type
curl --request GET \
--url https://api.pineyard.ai/analytics/by-campaign-type \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/analytics/by-campaign-type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/analytics/by-campaign-type"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"campaignTypeId": "<string>",
"campaignTypeName": "<string>",
"totalCalls": 123,
"completedCalls": 123,
"avgDurationMs": 123,
"completionRate": 123
}
]Analytics
Get call stats by campaign type
GET
/
analytics
/
by-campaign-type
Get call stats by campaign type
curl --request GET \
--url https://api.pineyard.ai/analytics/by-campaign-type \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/analytics/by-campaign-type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/analytics/by-campaign-type"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"campaignTypeId": "<string>",
"campaignTypeName": "<string>",
"totalCalls": 123,
"completedCalls": 123,
"avgDurationMs": 123,
"completionRate": 123
}
]Required scope:
analytics.viewAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.

