Skip to main content
DELETE
/
workspaces
/
{workspaceId}
/
billing-accounts
/
{billingAccountId}
/
subscriptions
/
{subscriptionId}
Cancel a subscription
curl --request DELETE \
  --url https://api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/subscriptions/{subscriptionId} \
  --header 'Authorization: Bearer <token>'
{
  "type": "conflict_error",
  "code": "cancellation_would_underprovision",
  "message": "Cannot delete subscription. Deleting it would leave the account under-provisioned for 'locations'. Current usage: 5, remaining capacity after deletion: 0.",
  "doc_url": "https://docs.altostrat.io/errors/cancellation_would_underprovision"
}

Authorizations

Authorization
string
header
required

Enter your JWT in the format: Bearer {token}

Path Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_a1b2c3d4e5f6g7h8"

billingAccountId
string
required

The ID of the billing account, which corresponds to a Stripe Customer ID (cus_...).

Example:

"cus_a1b2c3d4e5f6g7h8"

subscriptionId
string
required

The ID of the Stripe subscription (sub_...).

Example:

"sub_a1b2c3d4e5f6g7h8"

Response

The subscription was successfully scheduled for cancellation.