Credit spend
What the workspace spent per category in a period.
Headers
The endpoints on this page take these headers. Each endpoint's curl shows the ones it sends.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Ken-Version | header | string, one of: 2026-11-02, 1.1 | optional | The 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-Id | header | integer (int64) | optional | The 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. |
Get credit spend by category
/v1/credits/spendcredit-spend.get- Permission
- The
billingpermission - Rate limit
- 12,000 requests a minute per API key
Returns the credits the workspace spent in a period, split into five categories: infrastructure, ai, data, sending and calling. Each category has its net millicredits, the same amount in US cents at $0.02 a credit, and its number of ledger lines.
Set period to billing_month, last_30_days or all_time. The default is billing_month, the current billing month. On the Free plan it covers every day since signup, and the response reports period as since_signup.
Spend is net of refunds and write-offs. Like the ledger, a parent or standalone workspace includes its white-label client workspaces.
The same spend is also split per kind of work (actions, largest first, each with its title) and per campaign (campaigns: the 50 largest, plus one row with campaignId null for the work tied to no campaign; campaignsTruncated is true when more campaigns had spend). A campaign name is shown only for a campaign in the workspace that spent on it.
Errors:
400 validation_failed:periodis notbilling_month,last_30_daysorall_time.
Requires the billing permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
period | query | string | optional | The period to report: billing_month (the default), last_30_days or all_time. |
curl -X GET "https://api.ken.so/v1/credits/spend" \
-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 CreditSpend.
Show the 11 response fields and an example
The fields and an example are also on this endpoint's Markdown page.
More in Workspace and account:Your accountWorkspacesSandboxesMembersPermission templatesAccess requestsCreditsCredit estimatesCredit ledgerCredit rate cardCredit savingsCredit savings rowsWhite-label brandsCLI loginBug reportsAll resources