Add team member
/team/{id}/members
Adds one existing org member to the team and returns the whole team. Additive — it does not disturb the other members. Allowed for `team:manage` or an administrator of this team.
Path Parameters
Team id (team_…).
Request Body
User id (usr_…) of an active org member.
Response Body
How many of them administer the team, counted the same way.
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.
Always true here.
Team id (team_…).
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.
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.
Unique within the organization.
curl -X POST 'https://api.elaichi.ai/team/<id>/members' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"user_id":"your_user_id"}'const body = {
"user_id": "your_user_id"
};
const response = await fetch('https://api.elaichi.ai/team/<id>/members', {
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/<id>/members"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"user_id": "your_user_id"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())