delete_project

Permanently delete a project and everything beneath it. No soft-delete, no undo — confirm the target with a human first.

Purpose

Remove a project for good. Projects do not soft-delete: the row goes, and its plans, subscribers, subscriptions, resources, coupons, payment methods and support threads go with it through database cascades. The tool is for the genuinely finished project — a pilot that ran its course, a duplicate created by mistake — never for pausing sales.

Irreversible, and it takes everything with it

There is no restore for a deleted project; restore_project only reverses an archive. Confirm the exact project_id with a human before calling. The tool is annotated destructive so a client can prompt for confirmation.

Stopping sales is a different tool

To keep the history while turning new signups off, call archive_project. Existing subscribers keep their access and the project comes back with restore_project.

project.deleted emits before the row disappears, so a webhook listener receives the final snapshot — id, name, handle, active flag and team — while those ids still resolve. It is the last event the project will ever produce.

Idempotent in the only sense a hard delete can be: 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:delete

Input schema

{
  "type": "object",
  "required": ["project_id"],
  "properties": {
    "project_id": {
      "type": "string",
      "description": "UUID of the project to delete permanently."
    }
  }
}

Output shape

{
  "data": {
    "id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",
    "deleted": true
  }
}

id echoes the argument as sent; by the time the response is built there is no row left to read it back from.

Example prompts

"Delete project 7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13 — the pilot is over and I've checked nothing is left in it."

"Remove the duplicate 'Research Premium (copy)' project I created by accident."

"Wipe the test project and everything in it. Yes, I'm sure."

Failure modes

  • RESOURCE_NOT_FOUND — unknown project_id, a project belonging to another team, one outside the token's scope:project: allow-list, or a project that was already deleted.
  • VALIDATION_FAILED — the caller is a team member whose role lacks the team's project-delete permission. error.context.project carries the refusal.
  • AUTHENTICATION_REQUIRED — no authenticated user on the request.
  • TOKEN_MISSING_ABILITY — token lacks project: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