---
title: "Get tenant metrics"
method: GET
path: "/v2/{tenant_slug}/metrics"
tags: ["Metrics"]
---

# Get tenant metrics

`GET /v2/{tenant_slug}/metrics`

Retrieve tenant activity metrics for a selected date range.

## Path parameters

- `tenant_slug` string, required — Tenant DNS slug (lowercase letters, digits, and hyphens; 3-100 characters).

## Query parameters

- `start_date` string, date-time, required — Inclusive start of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional).
- `end_date` string, date-time, required — Exclusive end of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional). Events at exactly `end_date` are not included; must be strictly greater than `start_date`.
- `aggregation` 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'
- `metric` 'timestamp' | 'total_events' | 'guest_sessions' | 'non_guest_sessions' | 'unique_sessions' | 'unique_ids' | 'session_starts'

## Response `200`

Successful Response

- APIResponseMetricListResponse
  - `data` MetricListResponse, required
    - `metrics` MetricDataPoint[], required — Array of time-series metric data points ordered by timestamp
      - `timestamp` string, date-time, required — Start of the aggregation bucket this data point covers (RFC 3339 / ISO 8601 UTC)
      - `total_events` integer, nullable — Total events recorded in the bucket starting at `timestamp`
      - `guest_sessions` integer, nullable — Sessions for unauthenticated users in the bucket starting at `timestamp`
      - `non_guest_sessions` integer, nullable — Sessions for authenticated users in the bucket starting at `timestamp`
      - `unique_sessions` integer, nullable — Distinct session identifiers seen in the bucket starting at `timestamp`
      - `unique_ids` integer, nullable — Distinct end-user identifiers seen in the bucket starting at `timestamp`
      - `session_starts` integer, nullable — Session-start events recorded in the bucket starting at `timestamp`

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Request Validation Failed
- `500` — Internal Server Error
- `502` — Bad Gateway

---

[API](https://skmtc.net/urbanfox/apis/urbanfox-customer-api.md) · [All operations](https://skmtc.net/urbanfox/apis/urbanfox-customer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/urbanfox/urbanfox-customer-api/revisions/e99fd9028c60/schema)
