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

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

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

Path Parameters

workspaceId*string

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/billing/cancel'
Example Response
{  "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"    }  }}