Deactivate a team
Deactivates a team and removes its memberships.
The team is kept rather than erased: getTeam (GET /teams/{team_id}) still returns it with
status deactivated. The users whose lifecycle the team owns are
deactivated with it.
The request is idempotent. Deleting a team that is already deactivated or does not exist succeeds without changing anything.
A team that still owns a project is refused with 409 team.owns_project.
Deactivating it would leave the project owned by a deactivated team and so
unmanageable. No endpoint ends a team's ownership of a project yet, so for
now such a team cannot be deactivated through the API.
oauth2 team.deleteAuthorizationBearer <token>Scope: team.delete
team_id*stringThe team ID: the id that createTeam (POST /teams) or queryTeams (POST /teams/query) returns.
^[a-zA-Z0-9_-]+$The team is deactivated.
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080", token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});await client.deactivateTeam("team_01KZZY8PX8K8ATNVDSMRCZY4N1");Was this helpful?