org delete

The stacktape org delete command deletes the organization your API key belongs to. Use it when you no longer need an organization you own. The command enforces two safety constraints before proceeding: all other non-service users must already be removed, and all AWS accounts must be disconnected from the organization. Deleting the organization revokes its API keys, including the one you used.

An API key acts in one organization, so the command can delete only that organization. To delete another organization you own, run login with an API key of that organization first.

Usage

Run org delete without flags for the interactive flow, or pass the organization ID, --agent and --yes for non-interactive use in CI and agent workflows.

stacktape org delete

In interactive mode, the command names the organization and asks you to confirm. In agent mode, pass the ID of your API key's organization (org delete <organization-id>) and --yes. Any other ID is refused, and without --yes the command fails with CONFIRMATION_REQUIRED and deletes nothing.

stacktape org delete "org_abc123" --agent --yes

Prerequisites

Before you can delete an organization:

  1. Remove all non-service users (other team members must be removed first).
  2. Disconnect all AWS accounts from the organization.
  3. You must be the organization OWNER.
  4. You must be a member of at least one other organization.

If any of these conditions are not met, the operation will fail.

Deleting the organization cannot be undone. Make sure you have another way to access anything you still need before continuing.

Flags reference

The org delete command accepts the following flags. None are required in interactive mode; agent mode requires the organization ID and --yes.

stacktape org delete <organization-id>CLI options
-y, --yesboolean

Auto-Confirm Operation

Confirms an operation that would otherwise ask first: deleting a stack, an update that may delete stateful resources, creating a project that does not exist yet, and the other deletions that ask. Without a terminal to ask in (CI, --agent, machine-readable output), such an operation fails with CONFIRMATION_REQUIRED unless this flag is set. --agent does not confirm anything.

-h, --helpstring

Show Help

If provided, the command will not execute and will instead print help information.

--log-level"info" | "debug" | "error"

Log Level

The level of logs to print to the console.

  • info: Basic information about the operation.
  • error: Only errors.
  • debug: Detailed information for debugging.
--organization-id (positional 1)string

Organization ID

The ID of the Stacktape organization.

--quietboolean

Quiet

Hide progress, banners, success messages and hints. Command output, warnings and errors are still printed.

Examples

Check which organization your API key belongs to, then delete it. In a terminal, the command asks for confirmation.

stacktape org list
stacktape org delete

Non-interactive deletion in CI or agent workflows:

stacktape org delete "org_abc123" --agent --yes

Other organization management commands and the whoami command for verifying your current context.

  • org create — create a new organization
  • org list — list all organizations accessible to your user
  • login — switch to an API key of another organization
  • whoami — verify your current user, organization, and access