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.
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.
Prerequisites
Before you can delete an organization:
- Remove all non-service users (other team members must be removed first).
- Disconnect all AWS accounts from the organization.
- You must be the organization OWNER.
- 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, --yesbooleanAuto-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, --helpstringShow 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)stringOrganization ID
The ID of the Stacktape organization.
--quietbooleanQuiet
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.
Non-interactive deletion in CI or agent workflows:
Related commands
Other organization management commands and the whoami command for verifying your current context.
org create— create a new organizationorg list— list all organizations accessible to your userlogin— switch to an API key of another organizationwhoami— verify your current user, organization, and access