Referência REST

Métricas

As rotas de Métricas. Todo corpo é JSON, e o erro sempre volta como um objeto com código e mensagem.

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.

Parâmetros de query

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.

Resposta (object)

fromnumberObrigatório
tonumberObrigatório
sentnumberObrigatório
deliverednumberObrigatório
readnumberObrigatório
failednumberObrigatório
receivednumberObrigatório
billablenumberObrigatório
byCategoryobject[]Obrigatório
bySourceobject[]Obrigatório
errorsobject[]Obrigatório
dailyobject[]Obrigatório
timeZonestringObrigatório
truncatedbooleanObrigatório
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.

Resposta (object)

oktrueObrigatório
curl -X POST "https://zaiped.com/v1/analytics/refresh" \
  -H "Authorization: Bearer zp_..."
Referência REST