Admin team management — preview or execute a workspace teardown (audit-logged)
Preview (default) or execute a workspace teardown.
POST, not DELETE, for the same reason as POST /admin/support/erasure: the ceremony needs a request body, and the safe default — a dry run that computes what WOULD happen — must not be spelled with a destructive verb.
Dry run (default) returns the counts-only inventory: how many agents get reassigned to the owner, how many of those hold provider credentials that will be cleared, how many memberships and invitations are dropped, how many workspace radar presets die, and how many historical runs are left with a dangling team_id.
Execute reassigns the workspace agents to the OWNER's personal scope, revokes their workspace machine credentials, clears their provider credentials, and deletes the team with its memberships, invitations, and presets — all in one transaction with the audit row.
Member user accounts are never deleted. Removing a workspace removes access, not people.
Auth: anonymous → 401, non-admin → 403, admin → 200. Flag-off → 404. 404 when the team doesn't exist. 409 when a confirmation no longer matches the live workspace, or when the team has no resolvable owner to reassign its agents to. 422 when the execute body is incomplete (see AdminTeamDeletionRequest).
Request
- Base URL: https://api.badgeia.com
- URL: https://api.badgeia.com/api/v1/admin/teams/{team_id}/deletion
- Auth: none declared
Path parameters
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.