Skip to content

Delete teams

POSThttps://gptunnel.ru/api/v1/employees/deleteTeams

Delete one or more teams by ID. The API processes each team independently. Deleting a team removes its memberships and team-level limits.

Deleted teams no longer appear in the team list.

Request headers

ParameterTypeDescription
Authorization*stringAPI key

Request parameters

ParameterTypeDescription
teamIds*string[]Array of 1 to 25 team IDs. To delete a single team, pass an array with one ID.

Error reasons in failedTeams:

Error reasons

ParameterTypeDescription
not_foundstringNo team in the organization has this ID
errorstringUnexpected error while deleting the team

Set GPTUNNEL_API_KEY and replace the placeholders with values for your organization.

import json
import os
from urllib.request import Request, urlopen
key = os.environ.get("GPTUNNEL_API_KEY")
if not key:
raise SystemExit("Set GPTUNNEL_API_KEY")
body = {
"teamIds": [
"66a346f64dcb57627c03d596"
]
}
request = Request(
"https://gptunnel.ru/api/v1/employees/deleteTeams",
method="POST",
headers={
"Authorization": key,
"Content-Type": "application/json",
},
data=json.dumps(body).encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
print(json.load(response))
{
"code": 0,
"deleted": 1,
"failed": 0,
"failedTeams": []
}