Moonborn — API · billing
Paginated history of finalized usage snapshots
GET/v1/billing/usage/historyscope · Bearer (API key or session JWT)
Query parameters
| Field | Type | Description |
|---|---|---|
| from | string | Inclusive ISO date lower bound for usage snapshots. |
| to | string | Inclusive ISO date upper bound for usage snapshots. |
| cursor | string | Opaque pagination cursor; omit for the first page. |
| limit | number | Page size (1-100; default 20). |
Responses
200OK
Body
| Field | Type | Description |
|---|---|---|
| itemsreq | object[] | |
| nextCursorreq | string |
401Unauthenticated
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
422Validation error (from > to)
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X GET https://api.moonborn.co/v1/billing/usage/history \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.billing.listUsageHistory();Python
import os from moonborn import Moonborn client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"]) result = client.billing.list_usage_history()