Skip to content

Create a team

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

Creates a team in the organization that owns the API key. The server generates the team ID and returns it in teamId.

Save teamId from the successful response. Use it to add employees to the team or read its settings.

Request headers

ParameterTypeDescription
Authorization*stringAPI key

Request parameters

ParameterTypeDescription
name*stringTeam name
descriptionstringTeam description (up to 1,024 characters)
colorstringColor (up to 24 characters)
glyphstringTeam icon (up to 24 characters)

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 = {
"name": "Маркетинг",
"description": "Marketing Division"
}
request = Request(
"https://gptunnel.ru/api/v1/employees/createTeam",
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,
"teamId": "66a346f64dcb57627c03d596",
"name": "Маркетинг"
}