Call logs stats
GET
https://app.sulus.ai/api/call-logs/stats
Aggregate call statistics for the scoped account
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Query parameters
start_date
string
Optional
Nullable
Inclusive lower bound on start_time (date portion).
Stored in
call_logs.start_timeend_date
string
Optional
Nullable
Inclusive upper bound on start_time (date portion).
Stored in
call_logs.start_timeassistant_id
integer
Optional
Nullable
Limit aggregates to one local assistant id.
Stored in
call_logs.assistant_idErrors
| Status | Meaning | Body |
|---|---|---|
401 |
Missing or invalid bearer token | |
403 |
Feature call_logs not enabled for the account | {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"call_logs"} |
Notes
- totalCost is always present; non–content-admins receive 0.
- assistantPerformance rows include total_cost only for content admins.
- averageDuration is round() of the AVG(duration); totalDuration is the integer SUM.
- There is no failedCalls key in the live response (statusBreakdown covers per-status counts).
curl --request GET \
--url https://app.sulus.ai/api/call-logs/stats \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/call-logs/stats"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/call-logs/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"success": true,
"data": {
"totalCalls": 47,
"completedCalls": 39,
"totalDuration": 6120,
"inboundCalls": 40,
"outboundCalls": 7,
"totalCost": 0,
"averageDuration": 130,
"statusBreakdown": {
"completed": 39,
"no-answer": 5,
"failed": 3
},
"assistantPerformance": [
{
"assistant_id": 57,
"total_calls": 30,
"completed_calls": 26,
"avg_duration": 128.4
}
]
}
}
Response — GET
/call-logs/stats
200
{
"success": true,
"data": {
"totalCalls": 47,
"completedCalls": 39,
"totalDuration": 6120,
"inboundCalls": 40,
"outboundCalls": 7,
"totalCost": 0,
"averageDuration": 130,
"statusBreakdown": {
"completed": 39,
"no-answer": 5,
"failed": 3
},
"assistantPerformance": [
{
"assistant_id": 57,
"total_calls": 30,
"completed_calls": 26,
"avg_duration": 128.4
}
]
}
}