---
title: "Register client usage metrics"
method: POST
path: "/api/frontend/client/metrics"
tags: ["Frontend API"]
---

# Register client usage metrics

`POST /api/frontend/client/metrics`

Registers usage metrics. Stores information about how many times each flag was evaluated to enabled and disabled within a time frame. If provided, this operation will also store data on how many times each feature flag's variants were displayed to the end user. If the Frontend API is disabled 404 is returned.

## Request body

- ClientMetricsSchema — Client usage metrics, accumulated in buckets of hour by hour by default
  - `appName` string, required — The name of the application that is evaluating toggles
  - `instanceId` string — A [(somewhat) unique identifier](https://docs.getunleash.io/sdks/node#advanced-usage) for the application
  - `sdkVersion` string — An SDK version identifier. Usually formatted as "unleash-client-<language>:<version>"
  - `platformName` string — The platform the application is running on. For languages that compile to binaries, this can be omitted
  - `platformVersion` string — The version of the platform the application is running on. Languages that compile to binaries, this is expected to be the compiler version used to assemble the binary.
  - `yggdrasilVersion` string — The semantic version of the Yggdrasil engine used by the client. If the client is using a native engine this can be omitted.
  - `specVersion` string — The version of the Unleash client specification the client supports
  - `sdkFlavor` string — The identifier of an integration built on top of an Unleash SDK (e.g. an OpenFeature provider). Sent so adoption of the integration can be tracked alongside sdkVersion.
  - `sdkFlavorVersion` string — The version of the integration identified by sdk flavor, that has been built on top of an Unleash SDK
  - `bucket` object, nullable — Holds all metrics gathered over a window of time. Typically 1 hour wide. May be omitted or null when the request only carries impact metrics.
    - `start` union, required — A representation of a date. Either as a date-time string or as a UNIX timestamp.
      - string, date-time — An [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339.html)-compliant timestamp.
      - integer — A [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time).
    - `stop` union, required — A representation of a date. Either as a date-time string or as a UNIX timestamp.
      - string, date-time — An [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339.html)-compliant timestamp.
      - integer — A [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time).
    - `toggles` object, required — an object containing feature names with yes/no plus variant usage

## Response `200`

This response has no body.

## Other responses

- `204` — This response has no body.
- `400` — The request data does not match what we expect.
- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `404` — The requested resource was not found.

## Changes

- **2026-07-31** `fe6260d233aa` — 2 info
  - added the new optional request property `sdkFlavor`
  - added the new optional request property `sdkFlavorVersion`
- **2026-06-15** `b3d595aaaa7a` — 1 warning, 2 info
  - removed the request property `environment`
  - the request property `bucket` became nullable
  - the request property `bucket` became optional
- **2026-02-11** `2e02c84cb2ab` — 1 info
  - the request property `bucket/toggles/additionalProperties/variants` became nullable

[Change history](https://skmtc.dev/unleash/apis/unleash-api/changes/api/frontend/client/metrics/post.md)

---

[API](https://skmtc.dev/unleash/apis/unleash-api.md) · [All operations](https://skmtc.dev/unleash/apis/unleash-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/unleash/unleash-api/revisions/fe6260d233aa/schema)
