---
title: "Get usage for a specific license"
method: GET
path: "/licenses/{license_id}/usage"
tags: ["License"]
---

# Get usage for a specific license

`GET /licenses/{license_id}/usage`

Returns usage and remaining credits for a specific license over a date range.

Date range defaults to the current billing period if not specified.

## Path parameters

- `license_id` string, required

## Query parameters

- `start_date` string, date, nullable — Start date for the usage period (YYYY-MM-DD). Defaults to start of current billing period.
- `end_date` string, date, nullable — End date for the usage period (YYYY-MM-DD). Defaults to end of current billing period.
- `group_by` string, nullable — How to group the results. Valid values: 'license', 'day'. Can be combined (e.g., 'license,day').
- `cursor` string, nullable — Pagination cursor from a previous request.
- `limit` integer — Maximum number of rows in the response data (default 20, max 100).

## Response `200`

OK

- LicenseUsages
  - `data` LicenseUsage[], required
    - `license_id` string, nullable — The unique identifier for the license. Null when grouped by day only.
    - `subscription_id` string, required — The unique identifier for the subscription.
    - `license_type_id` string, required — The unique identifier for the license type.
    - `external_license_id` string, nullable — The external identifier for the license. Null when grouped by day only.
    - `start_date` string, date, required — The start date of the usage period.
    - `end_date` string, date, required — The end date of the usage period.
    - `allocated_credits` number, required — The total credits allocated to this license for the period.
    - `consumed_credits` number, required — The credits consumed by this license for the period.
    - `remaining_credits` number, required — The remaining credits available for this license (allocated - consumed).
    - `pricing_unit` string, required — The pricing unit for the credits (e.g., 'credits').
    - `allocation_eligible_credits` number, nullable — Credits consumed while the license was active (eligible for individual allocation deduction).
    - `shared_pool_credits` number, nullable — Credits consumed while the license was inactive (draws from shared pool, not individual allocation).
  - `pagination_metadata` PaginationMetadata, required
    - `has_more` boolean, required
    - `next_cursor` string, nullable, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict
- `413` — Content Too Large
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/withorb/apis/api-reference.md) · [All operations](https://skmtc.dev/withorb/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/withorb/api-reference/revisions/816dfe734e2e/schema)
