KaiTakami
03/04/2025, 2:59 AMVapi Support Bot
03/04/2025, 3:01 AMjson
curl --location 'https://api.vapi.ai/analytics' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \
--data '{
"queries": [
{
"name": "getAnalyticsByAssistantID",
"table": "call",
"timeRange": {
"start": "2025-03-03T00:00:00Z",
"end": "2025-03-03T23:59:59Z",
"step": "day"
},
"operations": [
{
"operation": "sum",
"column": "cost"
}
]
}
]
}'
Just replace the date in the request to match the day you want to check.
If the calls still don't show up after some time or if you need more help with the API, feel free to reach out! I'm here to help! 👍
Sources:Vapi Support Bot
03/04/2025, 3:01 AMKaiTakami
03/04/2025, 3:02 AMVapi Support Bot
03/04/2025, 3:03 AMbash
curl --location 'https://api.vapi.ai/analytics' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \
--data '{
"queries": [
{
"name": "getAnalyticsByAssistantID",
"table": "call",
"timeRange": {
"start": "2025-03-03T00:00:00-06:00", # Adjusted for Mexico time (UTC-6)
"end": "2025-03-03T23:59:59-06:00", # Adjusted for Mexico time (UTC-6)
"step": "day"
},
"operations": [
{
"operation": "sum",
"column": "cost"
}
]
}
]
}'
Make sure to replace Bearer token
with your actual API token.
2. **Timezone Adjustment**: Since you want the data in Mexico time, ensure that the start
and end
times in the request are adjusted to reflect the correct timezone (UTC-6 for most of Mexico).
3. **Check for Data**: After making the request, check the response to see the total amount spent for that day.
If you have any issues or need further assistance with the API, feel free to ask! 😊
Source:
- [Detailed Report on Calculating Total Amount Spent by All Assistants in Vapi Dashboard](https://discord.com/channels/1211482211119796234/1211483291111083018/1334161680988377119)Kyle Brunker
03/06/2025, 1:01 AM