Workspaces

Get Workspace Spend

Allocation versus actual, for the workspaces this caller can see.

The sibling above answers "how much of the plan is still unclaimed", which is what the workspace form needs. This one answers the customer's question: for a workspace I belong to, how much was set aside, how much has actually been spent this billing period, how much is left, and which agents are spending it.

Visibility is exactly the visibility every list endpoint uses, so it follows the access model rather than restating it: a member sees the workspaces they belong to, and an org admin sees all of them. The organization roll-up is included only for a caller who can already see every workspace, since it would otherwise describe spending in workspaces they are not on.

get/v1/workspaces/spend

Query parameters

workspace_idstring nullable

Headers

X-API-Keystring required

API key required to authenticate requests.

Response

Successful Response

period_startstring nullable
credits_availableboolean
minute_charges_configuredboolean required
org_limit_creditsnumber nullable
allocated_creditsnumber required
spent_creditsnumber nullable

Changes