Skip to content
POST /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

descriptionstring,null
member_idsstring[]

User ids (usr_…) of existing organization members to add alongside the caller. Optional.

namestring

Response Body

admin_countinteger

How many of them administer the team, counted the same way.

admin_previewobject[]

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.

avatar_urlstring,null

The person's picture — the same one the console's user menu draws: their stored profile picture, else a Gravatar URL (d=404, 96px) derived server-side from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.

emailstring,null
is_adminboolean

Always true here.

namestring,null
user_idstring
created_atstring · date-time
descriptionstring,null
idstring

Team id (team_…).

member_countinteger

How many people are in the team, counted server-side with one aggregate. This row carries no roster array to measure — GET /team/{id}/member is the roster.

member_previewobject[]

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.

avatar_urlstring,null

The person's picture — the same one the console's user menu draws: their stored profile picture, else a Gravatar URL (d=404, 96px) derived server-side from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.

emailstring,null
is_adminboolean
namestring,null
user_idstring
namestring

Unique within the organization.

updated_atstring · date-time
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())