REST reference

Analytics

The Analytics routes. Every body is JSON, and an error always comes back as an object with a code and a message.

GET

/v1/analytics

Message analytics for a period

Sent, delivered, read, failed and received counts, billing category mix, top errors and a daily series, from the account's message mirror.

Query parameters

fromstring
Start of the window, ISO 8601 date or epoch milliseconds. Default: seven days ago.
tostring
End of the window, ISO 8601 date or epoch milliseconds. Default: now.
numberIdstring
Restrict to one number.

Response (object)

fromnumberRequired
tonumberRequired
sentnumberRequired
deliverednumberRequired
readnumberRequired
failednumberRequired
receivednumberRequired
billablenumberRequired
byCategoryobject[]Required
bySourceobject[]Required
errorsobject[]Required
dailyobject[]Required
timeZonestringRequired
truncatedbooleanRequired
curl -X GET "https://zaiped.com/v1/analytics" \
  -H "Authorization: Bearer zp_..."
POST

/v1/analytics/refresh

Re-read Meta's billing analytics now

Runs the daily collection of Meta's cost and template analytics for the account. Limited to a few calls per hour.

Response (object)

oktrueRequired
curl -X POST "https://zaiped.com/v1/analytics/refresh" \
  -H "Authorization: Bearer zp_..."
REST reference