API reference OpenAPI 3.1
GET /api-usage

API usage and health

Operational request aggregates for the Platform console. Not billing or metering.

Bearer API key or staff session operation getApiUsage

Parameters

NameInTypeRequiredDescription
days query integer No default 7 · min 1 · max 30

Request

This endpoint has no request body.

curl "$MONICHEK_API/api-usage?days=7" \
  -H "Authorization: Bearer $MONICHEK_API_KEY"
const res = await fetch(`${MONICHEK_API}/api-usage?days=7`, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${MONICHEK_API_KEY}`,
  },
});

const data = await res.json();
import os
import requests

res = requests.get(
    f"{os.environ['MONICHEK_API']}/api-usage?days=7",
    headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
)
print(res.json())
$ch = curl_init(getenv('MONICHEK_API') . '/api-usage?days=7');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
    ],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Responses

200 OK usage aggregates application/json
{
  "window_days": 1,
  "generated_at": "2026-10-23T12:00:00Z",
  "scope": "company",
  "summary": {},
  "by_day": [
    {}
  ],
  "top_endpoints": [
    {}
  ],
  "top_errors": [
    {}
  ],
  "by_key": [
    {}
  ],
  "webhooks": {}
}
Response fields
FieldTypeRequiredDescription
window_days integer No —
generated_at string (date-time) No —
scope string No one of company, all
summary object No —
by_day array of object No —
top_endpoints array of object No —
top_errors array of object No —
by_key array of object No —
webhooks object No —

Error responses

StatusMeaningBody
403 Forbidden RFC 9457 problem

Errors use the RFC 9457 problem format with a stable code.