---
title: "Get usage for one API key."
method: GET
path: "/v1/usage/keys/{key_id}"
tags: ["Metering"]
---

# Get usage for one API key.

`GET /v1/usage/keys/{key_id}`

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/v1/usage/keys/{key_id}`
- Auth: HTTP bearer

Returns the request count for a single API key this billing month. Requires
the `metering:read` scope; the key must belong to the caller's org.

## Path parameters

- `key_id` string, required

## Response `200`

Usage detail for one API key this month

- KeyUsageDetail: Response for `GET /v1/usage/keys/{key_id}` — metadata for one key.
  - `key_id` string, required
  - `key_name` string, required
  - `key_prefix` string, required
  - `last_used_at` string, nullable: RFC3339 timestamp of the key's last use, or null if never used.

## Other responses

- `401`: Missing or invalid API key
- `403`: Token lacks the metering:read scope
- `404`: Key not found in this organization
- `500`: Internal error
- `501`: Billing not configured

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
