Create team
/team
Creates a team. Requires `team:create` (every Member holds it) or `team:manage`. Team names are unique within the organization. The caller becomes this team's administrator immediately — the same auto-ownership every other created resource gets — whether or not their own id also appears in `member_ids`. `member_ids` optionally adds other existing organization members (`GET /member`) as ordinary members in the same call; an id that is not already an org member fails the whole call before anything is created. To promote one of them to administrator too, follow up with `PATCH /team/{id}/members/{userId}`. There is no way to create a team you do not administer: to stand one up for somebody else, create it and appoint them; a team administrator cannot remove another administrator, themselves included, so taking yourself off afterwards needs a `team:manage` holder.
Request Body
User ids (usr_…) of existing organization members to add alongside the caller. Optional.
Response Body
How many of them administer the team.
The first few administrators, with display names already resolved, so a client can name them without a lookup per row. At most 5 — a preview for a hover, never the set; admin_count is the size. name and email are both null for someone who has left the organization.
The person's picture: their stored profile picture, else a Gravatar URL (d=404, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
Always true here.
Team id (team_…).
How many people are in the team. The row carries no roster array; GET /team/{id}/member is the roster.
The same, for the first few members (administrators included, flagged by is_admin). member_count is the size; GET /team/{id}/member is the full, paginated roster.
The person's picture: their stored profile picture, else a Gravatar URL (d=404, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
Unique within the organization.
curl -X POST 'https://api.elaichi.ai/team' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"your_name","member_ids":[]}'const body = {
"name": "your_name",
"member_ids": []
};
const response = await fetch('https://api.elaichi.ai/team', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/team"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"name": "your_name",
"member_ids": []
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())