---
title: "Get workspace credit history"
method: GET
path: "/v1/workspaces/{workspace_id}/billing/credit-history"
tags: ["billing-usage"]
---

# Get workspace credit history

`GET /v1/workspaces/{workspace_id}/billing/credit-history`

**Plan:** `Enterprise`

Returns the workspace's credit grant, expiry, adjustment, and conversion history, ordered by occurred_at descending with entry ID as the cursor tie-breaker.

## Path parameters

- `workspace_id` string, required — Workspace ID

## Query parameters

- `event_type` string[], nullable — Filter to one or more event types. Repeat to include multiple; omit for all.
- `limit` integer — Maximum number of items to return
- `cursor` string — Opaque pagination cursor returned by the previous page

## Response `200`

OK

- V1WorkspaceCreditHistoryBody
  - `data` V1CreditHistoryEntry[], nullable, required
    - `credits_change` number, double, required — Signed change in Lovable credits: positive for grants, negative for expiries and debits.
    - `event_type` 'granted' | 'expired' | 'adjustment' | 'converted', required — What happened to the credits.
    - `grant_type` 'billing' | 'rollover' | 'granted' | 'topup' | 'commitment' | 'cashback' | 'daily', required — Credit bucket this entry affected.
    - `id` string, required — Stable ledger entry ID.
    - `label` string, required — Human-readable summary of the entry.
    - `occurred_at` string, date-time, required — When the entry occurred (RFC3339, UTC).
  - `pagination` Pagination, required
    - `has_more` boolean, required — Whether more results are available beyond this page
    - `next_cursor` string, nullable, required — Cursor for the next page; null when there are no more results
  - `total` integer — Total entry count, present only on the first page. Capped — see total_is_capped.
  - `total_is_capped` boolean — True when total reached the count cap and the real total is higher.

## Other responses

- `401` — Missing or invalid API key.
- `402` — This operation or requested configuration requires a workspace plan that includes this feature.
- `403` — The key or caller lacks the required scope or permission.
- `406` — The Accept header excludes every media type this endpoint produces.
- `429` — Too many requests. Retry after the interval in Retry-After when present.
- `default` — Error. The response body uses the standard error envelope; status matches the HTTP status code and type is a machine-readable error code.

---

[API](https://skmtc.net/lovable/apis/lovable-api.md) · [All operations](https://skmtc.net/lovable/apis/lovable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lovable/lovable-api/revisions/aa8d44585147/schema)
