Retrieve an API key's usage
GET/api/v1/api-keys/{id}/usage
GET /api-keys/{id}/usage
curl -X GET 'https://www.unitpost.com/api/v1/api-keys/key_123/usage' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "api_key_usage",
"id": "id_123",
"last_used_at": "2026-01-01T00:00:00.000Z",
"requests_24h": 0,
"client_errors_24h": 0,
"server_errors_24h": 0,
"rate_limited_24h": 1
}One key's last 24 hours: how many requests it made, how many were answered 4xx, 5xx or 429, and when it was last used. Check it before you revoke a key (is anything still calling with it?) or when an integration's calls fail. The dashboard's revoke dialog reads the same count. Needs apikeys:read, which no key preset includes. Requires the apikeys:read capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Response · 200 fields7 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | The key (`key_…`). |
last_used_atrequired | string | null | — |
requests_24hrequired | integer | Requests the key made in the last 24 hours, counted up to 100,000: `100001` means more than 100,000. |
client_errors_24hrequired | integer | Of those, answered 4xx (`rate_limited_24h` included). Past the cap, these three count the latest 100,001 requests. |
server_errors_24hrequired | integer | Of those, answered 5xx. |
rate_limited_24hrequired | integer | Of those, answered 429. |
200401403404422503