# polymorfa analytics

> Read WhatsApp number activity and operational vitals.

## Commands

- [polymorfa analytics get](https://docs.polymorfa.com/cli/analytics/get): Read WhatsApp number analytics.
- [polymorfa analytics metrics](https://docs.polymorfa.com/cli/analytics/metrics): Export collector-compatible analytics metrics.

## polymorfa analytics get

Read WhatsApp number analytics.

Read WhatsApp number activity, completed 24-hour read and reply rates, response times, call outcomes and connection vitals. Requires sessions:read and Analytics enabled in the Console. Project credentials read only their project.

### Usage

```bash
polymorfa analytics get [flags]
```

### Flags

- `--session-id <value>` (value). Limit to one number record UUID.
- `--since <value>` (value). Start time in RFC 3339; defaults to 30 days ago.
- `--until <value>` (value). End time in RFC 3339; defaults to now.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

### Examples

```bash
polymorfa analytics get --project PROJECT_ID --json
```

```bash
polymorfa analytics get --since 2026-10-01T00:00:00Z --until 2026-10-03T00:00:00Z
```

## polymorfa analytics metrics

Export collector-compatible analytics metrics.

Write Prometheus or OpenMetrics gauges to stdout. Requires sessions:read and Analytics enabled in the Console. Counts cover completed UTC hours and are not monotonic counters. Project credentials read only their project. Disabled Analytics returns only enablement and window metadata. Use --json for a text body and response metadata envelope.

### Usage

```bash
polymorfa analytics metrics [flags]
```

### Flags

- `--format <value>` (value). Metrics representation. Values: `prometheus`, `openmetrics`. Default: `prometheus`.
- `--segments` (boolean). Include bounded metadata category breakdowns.
- `--session-id <value>` (value). Limit to one number record UUID.
- `--window-hours <value>` (value). Completed UTC hours to measure. Default: `24`.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

### Examples

```bash
polymorfa analytics metrics --project PROJECT_ID > analytics.prom
```

```bash
polymorfa analytics metrics --window-hours 24 --segments --format openmetrics
```
