# List credit ledger

List credit additions, deductions and running balances, newest first.

POST https://api.brigg.app/v1/operations/billing.ListCreditLedger

## Access & visibility

Allow `billing.ListCreditLedger` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | No | Maximum number of matching results to return. This operation does not provide a continuation cursor. Range: 1 to 500. |

## Balance, charges and underlying usage

[Get billing](https://developer.brigg.app/reference/billing/GetBilling) returns the current workspace balance. [List credit ledger](https://developer.brigg.app/reference/billing/ListCreditLedger) returns recent balance movements, newest first: a negative amount deducts credit; a positive amount adds it. The default is 50 rows and the maximum is 500, with no cursor for older pages.

For spending over a period, use [List usage](https://developer.brigg.app/reference/billing/ListUsage). Its from and to values are inclusive Unix millisecond timestamps. Use totals.spent_nok for charged credit: it comes from the credit ledger. The items describe individual credit charges and their activities. Use totals for period spending: item detail can be incomplete. Credit figures are in Norwegian kroner, not minor currency units.

Some plans hide credit information. An authorized member can still receive credit_info_hidden on those plans; changing the key's grants does not expose it. Storage usage is a separate byte quota, not a currency balance.

## Response

Returns **200 OK** with a JSON body.

This operation has no continuation cursor. An empty `items` array means no matching visible results were returned.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array of [Credit ledger entry](#credit-ledger-entry-response-items) | Yes | Workspace credit transactions, bounded by limit. This operation has no cursor pagination. |

### Credit ledger entry · response.items[]

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Unique identifier. Use the value returned by a create or list operation. |
| `org_id` | string | Yes | Org identifier. |
| `kind` | string | Yes | Reason for the credit movement, such as a credit purchase, allowance or usage charge. Allowed: `"trial_grant"`, `"bonus_grant"`, `"monthly_refill"`, `"manual_grant"`, `"topup"`, `"usage"`, `"refund"`, `"adjustment"`. |
| `amount_nok` | number | Yes | Credit movement in Norwegian kroner; positive adds credit and negative spends it. |
| `balance_after_nok` | number | Yes | Credit balance immediately after this entry, in Norwegian kroner. |
| `ref_table` | null or string | Yes | Category of the related billing record. Interpret together with ref_id; it is not an API endpoint. |
| `ref_id` | null or string | Yes | Identifier of the related billing record, when a related record was recorded. |
| `actor_account_id` | null or string | Yes | Member account responsible for the movement, or null for movements without a member actor. |
| `activity` | null or string | Yes | Usage activity associated with the movement, when recorded. |
| `note` | null or string | Yes | Additional explanation recorded with the movement, or null when none was supplied. |
| `timestamp` | number | Yes | Time this movement was recorded, in Unix milliseconds. |

## Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. |
| 403 | `credit_info_hidden` | This workspace plan does not expose credit and usage details. |

## Next steps

- [Get billing](https://developer.brigg.app/reference/billing/GetBilling)
- [List usage](https://developer.brigg.app/reference/billing/ListUsage)
- [Get storage usage](https://developer.brigg.app/reference/billing/GetStorageUsage)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/billing.ListCreditLedger' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{}'
```

#### TypeScript


```typescript
const response = await fetch("https://api.brigg.app/v1/operations/billing.ListCreditLedger", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = {}
request = Request(
    "https://api.brigg.app/v1/operations/billing.ListCreditLedger",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "items": [
    {
      "id": "credit_123",
      "org_id": "org_example",
      "kind": "usage",
      "amount_nok": -12.5,
      "balance_after_nok": 487.5,
      "ref_table": null,
      "ref_id": null,
      "actor_account_id": "account_alex",
      "activity": null,
      "note": "Document generation",
      "timestamp": 1794301200000
    }
  ]
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "description": "Maximum number of matching results to return. This operation does not provide a continuation cursor."
    }
  },
  "additionalProperties": false,
  "examples": [
    {}
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "title": "Credit ledger entry",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier. Use the value returned by a create or list operation.",
            "examples": [
              "credit_123"
            ]
          },
          "org_id": {
            "type": "string",
            "description": "Org identifier.",
            "examples": [
              "org_example"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "trial_grant",
              "bonus_grant",
              "monthly_refill",
              "manual_grant",
              "topup",
              "usage",
              "refund",
              "adjustment"
            ],
            "description": "Reason for the credit movement, such as a credit purchase, allowance or usage charge.",
            "examples": [
              "usage"
            ]
          },
          "amount_nok": {
            "type": "number",
            "description": "Credit movement in Norwegian kroner; positive adds credit and negative spends it.",
            "examples": [
              -12.5
            ]
          },
          "balance_after_nok": {
            "type": "number",
            "description": "Credit balance immediately after this entry, in Norwegian kroner.",
            "examples": [
              487.5
            ]
          },
          "ref_table": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Category of the related billing record. Interpret together with ref_id; it is not an API endpoint.",
            "examples": [
              null
            ]
          },
          "ref_id": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Identifier of the related billing record, when a related record was recorded.",
            "examples": [
              null
            ]
          },
          "actor_account_id": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Member account responsible for the movement, or null for movements without a member actor.",
            "examples": [
              "account_alex"
            ]
          },
          "activity": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "const": "chat"
              },
              {
                "type": "string",
                "const": "app_build"
              },
              {
                "type": "string",
                "const": "app_review"
              },
              {
                "type": "string",
                "const": "app_translation"
              },
              {
                "type": "string",
                "const": "document_create"
              },
              {
                "type": "string",
                "const": "document_fill"
              },
              {
                "type": "string",
                "const": "document_index"
              },
              {
                "type": "string",
                "const": "document_search"
              },
              {
                "type": "string",
                "const": "meeting_transcription"
              },
              {
                "type": "string",
                "const": "meeting_summary"
              },
              {
                "type": "string",
                "const": "meeting_prep"
              },
              {
                "type": "string",
                "const": "meeting_advice"
              },
              {
                "type": "string",
                "const": "brief_generate"
              },
              {
                "type": "string",
                "const": "brief_action"
              },
              {
                "type": "string",
                "const": "contact_enrichment"
              },
              {
                "type": "string",
                "const": "company_lookup"
              },
              {
                "type": "string",
                "const": "web_search"
              },
              {
                "type": "string",
                "const": "web_extract"
              },
              {
                "type": "string",
                "const": "image_analysis"
              },
              {
                "type": "string",
                "const": "design_generation"
              },
              {
                "type": "string",
                "const": "recruiting"
              },
              {
                "type": "string",
                "const": "reference_check"
              },
              {
                "type": "string",
                "const": "prospects"
              },
              {
                "type": "string",
                "const": "voice_call"
              },
              {
                "type": "string",
                "const": "phone_number"
              },
              {
                "type": "string",
                "const": "outreach_mailbox"
              },
              {
                "type": "string",
                "const": "domain_registration"
              },
              {
                "type": "string",
                "const": "domain_renewal"
              },
              {
                "type": "string",
                "const": "bankid_signature"
              },
              {
                "type": "string",
                "const": "sms"
              },
              {
                "type": "string",
                "const": "email_draft"
              },
              {
                "type": "string",
                "const": "email_validation"
              },
              {
                "type": "string",
                "const": "memory_update"
              },
              {
                "type": "string",
                "const": "derived_field"
              },
              {
                "type": "string",
                "const": "contact_import"
              },
              {
                "type": "string",
                "const": "onboarding"
              },
              {
                "type": "string",
                "const": "advertising"
              },
              {
                "type": "string",
                "const": "browser_agent"
              },
              {
                "type": "string",
                "const": "app_operation"
              }
            ],
            "description": "Usage activity associated with the movement, when recorded.",
            "examples": [
              null
            ]
          },
          "note": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Additional explanation recorded with the movement, or null when none was supplied.",
            "examples": [
              "Document generation"
            ]
          },
          "timestamp": {
            "type": "number",
            "description": "Time this movement was recorded, in Unix milliseconds.",
            "examples": [
              1794301200000
            ]
          }
        },
        "required": [
          "id",
          "org_id",
          "kind",
          "amount_nok",
          "balance_after_nok",
          "ref_table",
          "ref_id",
          "actor_account_id",
          "activity",
          "note",
          "timestamp"
        ],
        "additionalProperties": false
      },
      "description": "Workspace credit transactions, bounded by limit. This operation has no cursor pagination."
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "items": [
        {
          "id": "credit_123",
          "org_id": "org_example",
          "kind": "usage",
          "amount_nok": -12.5,
          "balance_after_nok": 487.5,
          "ref_table": null,
          "ref_id": null,
          "actor_account_id": "account_alex",
          "activity": null,
          "note": "Document generation",
          "timestamp": 1794301200000
        }
      ]
    }
  ]
}
```

