Bilal
03/12/2025, 12:03 AMVapi Support Bot
03/12/2025, 12:05 AMVapi Support Bot
03/12/2025, 12:05 AM/call
Endpoint
You can use the /call
endpoint to filter and view calls by specific assistants:
javascript
const response = await fetch('https://api.vapi.ai/call', {
headers: {
'Authorization': `Bearer YOUR_API_KEY`,
'Content-Type': 'application/json'
},
params: {
assistantId: 'your-assistant-id',
page: 1,
limit: 100
// You'll need to add date filtering parameters
}
});
### 2. Using the /analytics
Endpoint (Recommended)
This approach gives you more control over time ranges and data aggregation:
bash
curl --location 'https://api.vapi.ai/analytics' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your_vapi_access_token' \
--data '{
"queries": [
{
"name": "getAnalyticsByAssistantID",
"table": "call",
"timeRange": {
"start": "2024-03-01T00:00:00Z",
"end": "2024-03-31T23:59:59Z",
"step": "month"
},
"operations": [
{
"operation": "count",
"column": "*"
}
],
"groupBy": [
"assistantId"
]
}
]
}'
Note: For monthly data, make sure to:
- Set the timeRange
to the specific month you want
- Change the step
to "month"
- Use "operation": "count"
instead of "sum" to count the number of calls
ā ļø Important caveat: Some users have reported issues with the /call
endpoint not properly returning logs filtered by Assistant ID, with endpoints returning empty arrays. The analytics endpoint might be more reliable for this purpose.
Hope this helps! Let me know if you need any clarification.
Sources:Bilal
03/12/2025, 12:08 AMBilal
03/12/2025, 12:10 AMMason
03/12/2025, 12:12 AM