Skip to main content
POST
/
v1
/
plans.delete
Typescript (SDK)
import { Autumn } from 'autumn-js'

const autumn = new Autumn()

const result = await autumn.plans.delete({
  planId: "unused_plan",
});
{
  "success": true
}
Deletes a plan or a specific version of a plan.
Deleting a plan cannot be undone. Existing subscriptions to this plan will remain active until canceled.

Common Use Cases

await autumn.plans.delete({
  planId: "old_plan"
});

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.1
required

Body

application/json
plan_id
string
required

The ID of the plan to delete.

Minimum string length: 1
all_versions
boolean
default:false

If true, deletes all versions of the plan. Otherwise, only deletes the latest version.

Response

200 - application/json

OK

success
boolean
required