Skip to Content
Workspace and account

Credit ledger

Every credit added and spent.

Workspace and account1 endpointKen-Version: 2026-11-02AuthenticationWorkspacesErrors
MarkdownOpenAPI

Headers

The endpoints on this page take these headers. Each endpoint's curl shows the ones it sends.

NameInTypeRequiredDescription
Ken-Versionheaderstring, one of: 2026-11-02, 1.1optionalThe API version, a date in YYYY-MM-DD form. 1.1 is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.
X-Ken-Workspace-Idheaderinteger (int64)optionalThe id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers 400 workspace_required. A workspace you are not a member of answers 404 not_found.

List credit ledger lines

GET/v1/credits/ledgercredit-ledger.list
Permission
The billing permission
Rate limit
12,000 requests a minute per API key

Try it on developer.ken.so

Lists the lines on the workspace's credit account, newest first: charges, refunds, grants, expiries and adjustments. A parent or standalone workspace also sees the lines of its white-label client workspaces, and workspaceId on each line names the workspace that caused it. A white-label client workspace sees only its own lines.

Optional filters:

  • from and to: instants in UTC, both inclusive.
  • action: credit actions, comma-separated, such as email_found,web_scrape. A line matches any.
  • campaignId: the lines of one campaign.
  • category: spend categories, comma-separated. A line matches any of them: infrastructure, ai, data, sending, calling or added_expired. A refund or write-off belongs to its charge's category.
  • trigger: what started the work, comma-separated: person, ken, workflow, campaign_schedule or renewal. A line matches any.
  • actorUserId: the lines a member started.
  • contactId, accountId: the lines for one contact or account.
  • listId, workflowId: the lines for one list or workflow, older workflow lines included.
  • chatId: the lines of one Ken chat, its Ken run included. An unknown chat gives an empty page.
  • runId: every line of one run (a line's run.id), 1 to 100 characters.
  • q: text, 2 to 200 characters, case-insensitive. Matches a line's description as shown, title, web URL, or the name of its contact, account, list, workflow, Ken chat or campaign.

Filters combine with AND. limit is from 1 to 200, and the default is 50.

Errors:

  • 400 validation_failed: a filter, limit or cursor is invalid, or from is after to. error.details names the field.

Requires the billing permission.

Parameters

NameInTypeRequiredDescription
limitqueryinteger (int32)optionalThe page size, from 1 to 200. The default is 50.
cursorquerystringoptionalThe nextCursor of the previous page. Omit it for the first page.
fromquerystring (date-time)optionalOnly lines created at or after this instant, in UTC.
toquerystring (date-time)optionalOnly lines created at or before this instant, in UTC.
actionquerystringoptionalOnly lines of these credit actions, comma-separated, such as email_found,web_scrape. A line matches any of them.
campaignIdqueryinteger (int64)optionalOnly lines of this campaign.
categoryquerystringoptionalOnly lines in these spend categories, comma-separated: infrastructure, ai, data, sending, calling or added_expired. A refund or write-off belongs to its charge's category.
triggerquerystringoptionalOnly lines started this way, comma-separated: person, ken, workflow, campaign_schedule or renewal. A line matches any of them.
actorUserIdqueryinteger (int64)optionalOnly lines this member started.
contactIdqueryinteger (int64)optionalOnly lines for this contact.
accountIdqueryinteger (int64)optionalOnly lines for this account.
listIdqueryinteger (int64)optionalOnly lines for this list.
workflowIdqueryinteger (int64)optionalOnly lines of this workflow, older lines that named it only in their description included.
chatIdqueryinteger (int64)optionalOnly lines of this Ken chat: the chat itself and its Ken run.
runIdquerystringoptionalOnly the lines of this run (a line's run.id), 1 to 100 characters.
qquerystringoptionalText search, 2 to 200 characters, case-insensitive: a line's description as shown, title, web URL, or the name of its contact, account, list, workflow, Ken chat or campaign.
Request
curl -X GET "https://api.ken.so/v1/credits/ledger?limit=50" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"

Response 200

data is a list of CreditLedgerEntry. Each item has these fields. The response also carries pagination.

Show the 33 response fields and an example

The fields and an example are also on this endpoint's Markdown page.


On this page