Plans

Delete Plan

Soft-delete a specific plan version by setting deletedAt timestamp. Also soft-deletes associated plan features, plan enrollment rules, and cancels any scheduled subscription migrations to this plan. Does NOT delete active subscriptions—they remain active until naturally expiring or being manually canceled. The operation is atomic—all deletions happen in a transaction.

DELETE
/plans/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Path Parameters

id*string

Plan version ID (must start with pln_). Note: This deletes a specific version, not all versions of a stable plan.

Match^pln_[a-z0-9]+$

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://api.getlumen.dev/v1/plans/pln_01hrwzqrz4ytkwv07syv8k7g3z"
{
  "success": true,
  "message": "Plan deleted successfully"
}
{
  "error": "No plan ID found in URL"
}
{
  "error": "Plan not found or access denied"
}
{
  "error": "Failed to delete plan",
  "details": "Database transaction failed"
}