SnozeDevelopers
API referenceBilling

Cancel the workspace subscription

Cancels the workspace's subscription with the billing provider and returns the resulting subscription summary. Requires a Clerk session and the `billing:manage` workspace permission. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/billing/cancel
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/workspaces/string/billing/cancel"
{  "data": {    "workspaceId": "string",    "plan": "free",    "status": "none",    "polarCustomerId": "string",    "polarSubscriptionId": "string",    "polarProductId": "string",    "cancelAtPeriodEnd": true,    "currentPeriodEnd": "string"  }}