---
title: "Issue a short-lived token for live metrics (Enterprise)"
method: GET
path: "/api/token/metrics"
tags: ["Live Telemetry"]
---

# Issue a short-lived token for live metrics (Enterprise)

`GET /api/token/metrics`

## Request

- Base URL: `https://mail.example.com`
- URL: `https://mail.example.com/api/token/metrics`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
- TypeScript: <https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/docs/api/token/metrics/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a plain-text bearer token, valid for 60 seconds, that authorises
connecting to `/api/live/metrics` as a query parameter. Requires the
`LiveMetrics` permission. Available only in the Enterprise edition.

## Response `200`

Short-lived metrics token

## Other responses

- `401`: Missing or invalid credentials
- `403`: Authenticated principal lacks the required permission
- `404`: Enterprise feature not available in this edition

## Changes

- **2026-07-17** (v1) `a38a1bbfe8b2`: 1 info
  - endpoint added
- **2025-01-05** (v1) `fbbe298bfa82`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/changes/api/token/metrics/get.md)

---

[API](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api.md) - [All operations](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/revisions/a38a1bbfe8b2?raw)
