Get campaign call metrics
curl --request GET \
--url https://api.pineyard.ai/campaigns/{id}/metrics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/campaigns/{id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"callPerformance": {
"totalCalls": 123,
"connectedCalls": 123,
"connectionRatePercent": 123,
"averageDurationSeconds": 123,
"failedCalls": {
"totalPercent": 123,
"notReachable": {
"count": 123,
"percent": 123
},
"switchedOff": {
"count": 123,
"percent": 123
},
"busy": {
"count": 123,
"percent": 123
}
}
},
"conversationOutcomes": {
"interested": {
"count": 123,
"percent": 123
},
"notInterested": {
"count": 123,
"percent": 123
},
"callBackLater": {
"count": 123,
"percent": 123
},
"invalidSpam": {
"count": 123,
"percent": 123
},
"other": {
"count": 123,
"percent": 123
}
},
"callTimingInsights": {
"pickupRateByHour": {},
"pickupRateByDay": {},
"bestTimeToCall": "<string>"
}
}Results & insights
Get campaign call metrics
GET
/
campaigns
/
{id}
/
metrics
Get campaign call metrics
curl --request GET \
--url https://api.pineyard.ai/campaigns/{id}/metrics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/campaigns/{id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"callPerformance": {
"totalCalls": 123,
"connectedCalls": 123,
"connectionRatePercent": 123,
"averageDurationSeconds": 123,
"failedCalls": {
"totalPercent": 123,
"notReachable": {
"count": 123,
"percent": 123
},
"switchedOff": {
"count": 123,
"percent": 123
},
"busy": {
"count": 123,
"percent": 123
}
}
},
"conversationOutcomes": {
"interested": {
"count": 123,
"percent": 123
},
"notInterested": {
"count": 123,
"percent": 123
},
"callBackLater": {
"count": 123,
"percent": 123
},
"invalidSpam": {
"count": 123,
"percent": 123
},
"other": {
"count": 123,
"percent": 123
}
},
"callTimingInsights": {
"pickupRateByHour": {},
"pickupRateByDay": {},
"bestTimeToCall": "<string>"
}
}Required scope:
campaigns.viewAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.

