Cancel a scheduled plan change
Keeps the current plan by dropping a downgrade or interval switch scheduled for the renewal, then returns the subscription. Succeeds without changes when nothing is scheduled; a workspace without a subscription is a conflict. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission. Send an `Idempotency-Key` header to make retries safe.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringSuccess
application/json- response
data*curl -X DELETE 'https://api.snoze.dev/v1/workspaces/string/billing/scheduled-change'{ "data": { "workspaceId": "string", "plan": "free", "status": "none", "polarCustomerId": "string", "polarSubscriptionId": "string", "polarProductId": "string", "cancelAtPeriodEnd": true, "currentPeriodStart": "string", "recurringInterval": "month", "currentPeriodEnd": "string", "scheduledChange": { "plan": "free", "interval": "month", "effectiveAt": "string" } }}Change the workspace subscription plan
Applies a previewed plan change and returns the updated subscription. Send the preview's `timing` (`now` charges the prorated difference immediately, `period_end` schedules the change for the renewal), `dueNowCents` and `recurringAmountCents` as the customer confirmed them; the server re-quotes and rejects with a conflict when the timing or recurring amount differs or the charge due now is higher. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission. Send an `Idempotency-Key` header to make retries safe.
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.