---
title: "Métricas · Referência REST"
description: "As rotas de Métricas. Todo corpo é JSON, e o erro sempre volta como um objeto com código e mensagem."
lang: "pt-BR"
canonical: "https://zaiped.com/developers/docs/reference/analytics"
alternate: "https://zaiped.com/en/developers/docs/reference/analytics"
---

# Métricas · Referência REST

## 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**

- `from` · string: Start of the window, ISO 8601 date or epoch milliseconds. Default: seven days ago.
- `to` · string: End of the window, ISO 8601 date or epoch milliseconds. Default: now.
- `numberId` · string: Restrict to one number.

**Resposta (object)**

- `from` · number (Obrigatório)
- `to` · number (Obrigatório)
- `sent` · number (Obrigatório)
- `delivered` · number (Obrigatório)
- `read` · number (Obrigatório)
- `failed` · number (Obrigatório)
- `received` · number (Obrigatório)
- `billable` · number (Obrigatório)
- `byCategory` · object[] (Obrigatório)
- `bySource` · object[] (Obrigatório)
- `errors` · object[] (Obrigatório)
- `daily` · object[] (Obrigatório)
- `timeZone` · string (Obrigatório)
- `truncated` · boolean (Obrigató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)**

- `ok` · true (Obrigatório)

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