List Billing Logs

List the credit-denominated billing ledger with source filtering and opaque cursor pagination. period defaults to 30d, so an unqualified request covers only the last 30 days: paginating to nextCursor: null exhausts that window, not the whole ledger. Pass period=all for full history, or period=custom with startDate and endDate for a specific range.

GET/api/v2/billing/logs
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one from the Sim dashboard under Settings > API Keys. A workspace API key is not accepted everywhere: operations that act on behalf of a specific human — administrative reads, secret access, and irreversible or governance-affecting writes — always reject it, whatever role the key carries. Each such operation says so in its own description, and the rejection surfaces as 403 unless the operation conceals unauthorized resources, in which case it is reported as 404. Use a personal API key for those.

In: header

Query Parameters

source?string

Restrict results to one usage source.

Value in"workflow" | "wand" | "sim-chat" | "mcp_copilot" | "mothership_block" | "knowledge-base" | "voice-input" | "enrichment" | "voice-output"
workspaceId?string

Restrict results to one workspace whose payer the caller can inspect.

Length1 <= length
period?string

Relative window, all history, or a custom date range.

Default"30d"
Value in"1d" | "7d" | "30d" | "all" | "custom"
startDate?string

Start of a custom window as a Date-parseable string.

Length1 <= length
endDate?string

End of a custom window as a Date-parseable string; defaults to now.

Length1 <= length
limit?integer

Maximum usage events per page, from 1 to 100.

Default50
Range1 <= value <= 100
cursor?string

Opaque cursor returned by the previous page.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/billing/logs"
{
  "data": [
    {
      "id": "log_1",
      "createdAt": "2026-07-29T18:04:11.000Z",
      "source": "sim-chat",
      "workspaceId": "ws_1",
      "workflow": null,
      "runId": null,
      "creditCost": 12
    }
  ],
  "nextCursor": null
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}