Get a line's activity
GET/v1/profiles/{profile_id}/stats
- Scope
messages:read
Messages sent, delivered, read, received and failed over the last days days, the average reply time, the busiest hour and messages per day, in time_zone.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).
Query
daysintegerHow many days back, 1–90 (default 30), ending today.
time_zonestringAn IANA time zone for days and hours (default
UTC), such asAmerica/New_York.
Response
200 OKThe activity.
object"line_stats"requiredprofile_idstringrequiredprf_…fromtimestamprequiredtotimestamprequiredtime_zonestringrequireddaysintegerrequiredsentintegerrequireddeliveredintegerrequiredreadintegerrequiredreceivedintegerrequiredfailedintegerrequiredavg_reply_secondsnumber or nullrequiredFrom a contact's first unanswered message to the team's next answer; a 12-hour gap starts a new wait.
busiest_hourobject or nullrequiredLocal time.
Fields of
busiest_hourstartstringrequiredmessagesintegerrequired
avg_per_hournumberrequiredMessages per hour between 8 AM and 8 PM local time.
dailyarray of objectrequiredOne row per local day, oldest first, ending today.
Fields of
dailydatestringrequiredsentintegerrequiredreceivedintegerrequired
Errors
| Status | Code | Means |
|---|---|---|
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.