---
title: "Marketplace Usage"
method: GET
path: "/admin/keys/usage"
tags: ["admin"]
---

# Marketplace Usage

`GET /admin/keys/usage`

## Request

- Base URL: `https://api.casenode.ai`
- URL: `https://api.casenode.ai/admin/keys/usage`
- Auth: none declared. Required headers: `authorization`

Daily request counts for marketplace gateway keys.

Marketplace keys carry no user_id, so both limiters bucket them on api_keys.id —
which is also their subject_id in daily_usage. Use this to reconcile each hub's
volume against its payout report; it is the only per-caller meter that exists.

`keys` lists every gateway key ever minted, revoked ones included and flagged as
such: revocation is a soft delete, and the reconciliation that settles a hub's final
invoice happens *after* the key is disabled, so filtering on is_active would hide
precisely the month an operator is trying to bill. It also means a hub that sent no
traffic in the window is distinguishable from one that was never provisioned.

`days` is bounded because the date minus a large int is a Postgres 'date out of
range' error, and a negative would silently report zero volume.

## Query parameters

- `days` integer

## Headers

- `authorization` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casenode/apis/casenode-api.md) · [All operations](https://skmtc.dev/casenode/apis/casenode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casenode/apis/casenode-api/revisions/5b2883d19661?raw)
