Read the workspace usage breakdown
Returns per-resource usage counts for the workspace. Deliberately open to any workspace member rather than gated on `billing:read`, because these counts are what the interface uses to explain why a limit-bound action is unavailable.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/workspaces/string/billing/usage"{ "data": { "billableSeats": 0, "freeSeats": 0, "records": 0, "automationRunsThisMonth": 0, "automations": 0, "dashboards": 0, "forms": 0, "storageBytes": 0 }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Change the workspace subscription plan
Moves the existing subscription to the requested plan and billing interval in place, then returns the resulting subscription. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission; the caller's pricing-experiment variant is applied so the price matches the catalog they were shown.
Open a hosted checkout session for a plan
Creates a Polar checkout session for the requested plan and interval, sized to the workspace's current seat count, and returns the hosted URL to redirect to. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission; opening checkout also records a pricing-experiment exposure so a direct link is attributed like a catalog view.