> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit Ledger API

> Every Smart Prospect credit you spent or got back, one entry per movement, newest first - GET /billing/ledger

> [!NOTE]
>
> **Credit cost:** Free. This call only reads your credit history.

> [!NOTE]
>
> This endpoint requires your API key: pass it as the `api_key` query parameter, or in an `X-API-Key` or `Authorization: Bearer` header (see [Authentication](https://api.smartlead.ai/authentication.md)).

Use it to reconcile what a fetch charged and what came back. A fetch charges up front, and each contact whose email is not found is refunded after the background email lookup, so one fetch can show a `debit` entry and later `refund` entries. Each refund is listed once, even when it was retried. For totals over the same window by feature and day, the [MCP tool](https://api.smartlead.ai/mcp/tools.md) `sp_get_credit_usage` reads the same data. For your current balance, use [Credit Balance](https://api.smartlead.ai/api-reference/smart-prospect/credit-balance.md).

## Query Parameters

**from** `string`

Window start, ISO-8601 date-time (for example `2026-11-01T00:00:00Z`). Default: the start of last calendar month (UTC).

**to** `string`

Window end, ISO-8601 date-time, later than `from`. Default: now.

**limit** `number` (default: 100)

Entries per page, 1–500.

**before\_id** `number`

For the next page: the `next_before_id` of the previous page. An ID that is not one of your entries returns an empty page.

```bash cURL theme={null}
curl "https://prospect-api.smartlead.ai/api/v1/search-email-leads/billing/ledger?from=2026-11-01T00:00:00Z&limit=100" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Response Fields

**from** `string`

Window start used

**to** `string`

Window end used

**entries** `object[]`

One entry per credit movement, newest first.

**entry**

**id** `number`

Entry ID

**ts** `string`

When it happened (ISO-8601)

**action** `string`

`debit` (credits spent) or `refund` (credits given back)

**feature** `string`

`email_find`, `email_verify` or `phone_find`

**debit** `number`

Credits spent (`0` on a refund)

**refund** `number`

Credits given back (`0` on a debit)

**filter\_id** `number | null`

The search the movement belongs to, when it was recorded

**next\_before\_id** `number | null`

Pass it as `before_id` for the next page. `null` on the last page. A page can hold fewer entries than `limit`, even none (a retried refund is listed once), so keep paging while `next_before_id` is not `null`

## Response Codes

**200** `Success`

Ledger returned

**400** `Bad Request`

`from` not earlier than `to`, a malformed date, `limit` outside 1–500, or `before_id` not a positive integer

**401** `Unauthorized`

Missing or invalid API key

**403** `Forbidden`

Called with a client (agency sub-account) API key (use the main account key), or your plan does not include API access.

```json 200 - Ledger page theme={null}
{
  "success": true,
  "message": "Credit ledger retrieved.",
  "data": {
    "from": "2026-11-01T00:00:00.000Z",
    "to": "2026-12-02T10:00:00.000Z",
    "entries": [
      { "id": 9812, "ts": "2026-11-20T11:04:10.000Z", "action": "refund", "feature": "email_find", "debit": 0, "refund": 12, "filter_id": null },
      { "id": 9790, "ts": "2026-11-20T10:58:02.000Z", "action": "debit", "feature": "email_find", "debit": 400, "refund": 0, "filter_id": 12345 }
    ],
    "next_before_id": null
  }
}
```

```json 400 - Bad limit theme={null}
{
  "success": false,
  "message": "`limit` must be between 1 and 500."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.