Retrieve the total credit consumption over a period, for your own organization by default. The caller is resolved from your authentication token.
GET /v1/credits-usage
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| from | string (Y-m-d) | no | Start date (inclusive). Defaults to the first day of to's month when omitted. |
| to | string (Y-m-d) | no | End date (inclusive). Defaults to today when omitted. |
| organization_id | string (UUID) | no | Report on a specific organization instead of your active one. You must be a member of it (or an admin of a headquarter it belongs to). Cannot be combined with headquarter_id. |
| headquarter_id | string (UUID) | no | Report the aggregated total across every organization under this headquarter. You must be an admin of it. Cannot be combined with organization_id. |
Without from/to, the response reports the current month. The response always echoes back the effective from/to dates used for the calculation, so you know exactly which period the total covers — for example, a range straddling two months only counts the days actually within from/to, not the full months.
Without organization_id/headquarter_id, the response reports your currently active organization. The response echoes back whichever of organization_id/headquarter_id was applied (the other is null), so you can confirm the scope of the total.
| Status | When |
|---|---|
| 403 | organization_id/headquarter_id refers to an organization/headquarter you don't have access to |
| 404 | organization_id/headquarter_id doesn't resolve to an existing organization/headquarter |
| 422 | Both organization_id and headquarter_id given, or invalid from/to/organization_id/headquarter_id format |
Status: 200 OK
{
"from": "2026-07-01",
"to": "2026-07-31",
"organization_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"headquarter_id": null,
"credits_used": 42.5
}