---
title: "Get credit usage"
method: GET
path: "/api/v1/credits/usage"
tags: ["Credit usage"]
---

# Get credit usage

`GET /api/v1/credits/usage`

Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.

## Query parameters

- `limit` integer
- `after` string
- `before` string
- `customerId` string, required
- `resourceId` string
- `currencyId` string
- `timeRange` 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'
- `startDate` string, date-time
- `endDate` string, date-time
- `groupBy` string

## Headers

- `X-ACCOUNT-ID` string
- `X-ENVIRONMENT-ID` string

## Response `200`

Credit usage data with time-series points per feature.

- CreditUsageResponseDto — Response object
  - `data` object, required — Credit usage data grouped by feature with time-series points
    - `series` object[], required — Credit usage series grouped by feature
      - `featureId` string, nullable, required — The feature ID; null when grouping by dimensions only
      - `featureName` string, nullable, required — The display name of the feature; null when grouping by dimensions only
      - `totalCredits` number, required — Total credits consumed by this feature in the time range
      - `points` object[], required — Time-series data points for this feature
        - `timestamp` string, date-time, required — The timestamp of the data point
        - `value` number, required — The credit usage value at this point
      - `tags` object[] — Dimension key/value pairs identifying this series when groupBy is applied
        - `key` string, required — The dimension key
        - `value` string, required — The dimension value for this series
    - `currency` object, nullable, required — The custom currency used for credit measurement
      - `currencyId` string, required — The currency identifier
      - `displayName` string, required — The display name of the currency
      - `symbol` string, nullable, required — The currency symbol
      - `singular` string, nullable, required — Singular unit label
      - `plural` string, nullable, required — Plural unit label
    - `pagination` object, required — Cursor-based pagination for the returned series. `next`/`prev` are opaque cursors; pass them back as `after`/`before` to traverse pages. The series axis is `groupBy` when provided, otherwise `featureId`
      - `next` string, nullable, required — Cursor for fetching the next page of results, or null if no additional pages exist
      - `prev` string, nullable, required — Cursor for fetching the previous page of results, or null if at the beginning

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — CreditUsage not found.
- `429` — Too many requests.

## Changes

- **2026-06-08** `3acd63d6c861` — 2 info
  - added the new optional `header` request parameter `X-ACCOUNT-ID`
  - added the new optional `header` request parameter `X-ENVIRONMENT-ID`
- **2026-06-04** `4fa87d66426d` — 1 warning
  - added the new `PricingModelNotSupportedByBillingIntegration` enum value to the `code` response property for the response status `400`
- **2026-06-02** `ff3654f420a4` — 4 info
  - added the new optional `query` request parameter `after`
  - added the new optional `query` request parameter `before`
  - added the new optional `query` request parameter `limit`
  - added the required property `data/pagination` to the response with the `200` status
- **2026-05-31** `0dece860f678` — 1 warning
  - added the new `DataExportIntegrationError` enum value to the `code` response property for the response status `400`
- **2026-05-28** `b181b166a2a5` — 1 warning
  - added the new `InvalidReceivedSignatureError` enum value to the `code` response property for the response status `400`

[Full history](https://skmtc.dev/stiggio/apis/stigg-api/changes/api/v1/credits/usage/get.md)

---

[API](https://skmtc.dev/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.dev/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stiggio/apis/stigg-api/revisions/de96c0c4633a?raw)
