Analytics

Analytics Timeseries

The requested metrics per bucket (day, week from Monday, or month; UTC), zero-filled, split by `group_by`. At most 50 groups (largest totals of the first metric first; `truncated`). Default metrics: emails_sent, replies, replies_interested, bounces_hard, meetings_booked, calls_completed, opt_outs.

API key access

Needs the analytics:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role.
GET/api/v1/analytics/timeseries
AuthorizationBearer <token>

Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).

In: header

Query Parameters

from?string | null

First UTC day (default: to minus 29 days)

Formatdate
to?string | null

Last UTC day (default: today)

Formatdate
interval?AnalyticsInterval | null

Default day

group_by?AnalyticsGroupBy | null

Default none

metric?array<AnalyticsMetric> | null

Repeat for several

sequence_id?array<string> | null

Repeat to match any of

channel?array<EventChannel> | null

Repeat to match any of

mailbox_id?array<string> | null

Repeat to match any of

Header Parameters

X-Workspace-Id?string | null

Id of the workspace to act on (must be a member).

Response Body

curl -X GET "http://localhost:8000/api/v1/analytics/timeseries?from=2019-08-24&to=2019-08-24&metric=emails_sent&sequence_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&channel=email&mailbox_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Workspace-Id: string"
{
  "from": "2019-08-24",
  "to": "2019-08-24",
  "timezone": "UTC",
  "interval": "day",
  "group_by": "none",
  "metrics": [
    "emails_sent"
  ],
  "as_of": "2019-08-24T14:15:22Z",
  "filters": {
    "sequence_id": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "channel": [
      "email"
    ],
    "mailbox_id": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
  },
  "truncated": true,
  "series": [
    {
      "key": "string",
      "label": "string",
      "totals": {
        "property1": 0.1,
        "property2": 0.1
      },
      "points": [
        {
          "bucket": "2019-08-24",
          "values": {
            "property1": 0.1,
            "property2": 0.1
          }
        }
      ]
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}