Docs

Deactivate a team

DELETE
/teams/{team_id}

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.

Authorization

oauth2 team.delete
headerAuthorizationBearer <token>

Scope: team.delete

Path Parameters

team_id*string

The team ID: the id that createTeam (POST /teams) or queryTeams (POST /teams/query) returns.

Match^[a-zA-Z0-9_-]+$

Response Body

The team is deactivated.

Example Request
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");
Example Response
Empty

Was this helpful?