Skip to main content
DELETE
https://sandbox.getcollate.io/api
/
v1
/
teams
/
{id}
DELETE /v1/teams/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Teams

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Teams.delete("449b5f25-4cbb-42db-8f71-3be2c5cd888a")

# Hard delete
Teams.delete(
    "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
    hard_delete=True
)

# Delete by name
Teams.delete_by_name("Accounting")

# Delete by name with options
Teams.delete_by_name(
    "Accounting",
    hard_delete=True
)

# Restore a soft-deleted team
Teams.restore("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
{
  "id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
  "teamType": "Group",
  "name": "Accounting",
  "fullyQualifiedName": "Accounting",
  "version": 0.2,
  "updatedAt": 1769982623753,
  "updatedBy": "admin",
  "parents": [
    {
      "id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
      "type": "team",
      "name": "Finance",
      "fullyQualifiedName": "Finance"
    }
  ],
  "deleted": true,
  "owners": [],
  "domains": [],
  "children": [],
  "policies": []
}

Delete a Team

Delete a team by ID. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the team to delete.
recursive
boolean
default:"false"
Recursively delete child entities.
hardDelete
boolean
default:"false"
Permanently delete the team. If false, the team is soft-deleted and can be restored.

Restore a Soft-Deleted Team

Use PUT /v1/teams/restore to restore a soft-deleted team.
id
string
required
UUID of the soft-deleted team to restore.
DELETE /v1/teams/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Teams

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Teams.delete("449b5f25-4cbb-42db-8f71-3be2c5cd888a")

# Hard delete
Teams.delete(
    "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
    hard_delete=True
)

# Delete by name
Teams.delete_by_name("Accounting")

# Delete by name with options
Teams.delete_by_name(
    "Accounting",
    hard_delete=True
)

# Restore a soft-deleted team
Teams.restore("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
{
  "id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
  "teamType": "Group",
  "name": "Accounting",
  "fullyQualifiedName": "Accounting",
  "version": 0.2,
  "updatedAt": 1769982623753,
  "updatedBy": "admin",
  "parents": [
    {
      "id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
      "type": "team",
      "name": "Finance",
      "fullyQualifiedName": "Finance"
    }
  ],
  "deleted": true,
  "owners": [],
  "domains": [],
  "children": [],
  "policies": []
}

Returns

Soft delete returns the team object with deleted: true. Hard delete returns no content (204). Restore returns the restored team object.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete this team
404NOT_FOUNDTeam with given ID does not exist