delete_plan

Soft-delete a plan so it leaves the portal, the bot and every list. Existing subscriptions run to their end. Refused while pass holders have windows ahead.

Purpose

Retire a plan for good. The row is soft-deleted: it disappears from the portal, the bot and every list, nobody can buy it again, and the subscriptions already sold keep their history and keep running to their end. Emits plan.deleted with a snapshot taken before the row goes.

Confirm the target with a human

Deletion cannot be undone from the API. The tool is annotated destructive so a client can prompt for confirmation; read the plan back with get_plan and confirm the plan_id before calling.

A pass plan with windows still to run is refused

Deleting a pass plan would cascade away access windows customers have paid for. While any holder has a window that has not run yet, the service refuses with VALIDATION_FAILED. Call publish_plan with active: false instead: new sales stop while the purchased windows still open on schedule. Delete once the last of them has closed.

Idempotent: a second call on the same id finds nothing and answers RESOURCE_NOT_FOUND, exactly as an unknown or out-of-scope id does.

Required ability

project-subscription-plan:delete

Input schema

{
  "type": "object",
  "required": ["plan_id"],
  "properties": {
    "plan_id": {
      "type": "string",
      "description": "UUID of the plan to delete."
    }
  }
}

Output shape

{
  "data": {
    "id": "c4e82f16-93a7-4d5b-b81c-6e0f27a94d3b",
    "deleted": true
  }
}

id echoes the argument as sent.

Example prompts

"Delete plan c4e82f16-93a7-4d5b-b81c-6e0f27a94d3b — it was a test."

"Remove the old Beta Early-Bird plan; nobody has been on it for a year."

"Get rid of last season's pass plan now that every window has closed."

Failure modes

  • VALIDATION_FAILED — a pass plan whose customers still hold access windows that have not run (error.context.plan carries the refusal and points at disabling instead), or the caller is a team member whose role lacks the team's plan-delete permission.
  • RESOURCE_NOT_FOUND — unknown plan_id, a plan on another team's project, one outside the token's scope:project: allow-list, or a plan already deleted.
  • AUTHENTICATION_REQUIRED — no authenticated user on the request.
  • TOKEN_MISSING_ABILITY — token lacks project-subscription-plan:delete.

How is this guide?

On this page

Subscriby is a product designed by you — for you.

No boardroom full of executives deciding what we ships next. Our roadmap always shaped by you with your feedback.

Share feedback or a request