Skip to content

Teams

A team is a group of people in the organization. Team membership decides who can see content shared with that team. The list of teams, with or without each member’s name and email, is List teams and needs only read. The writes on this page need team:manage.

What a team holds in the library is a different act. Adding and removing those resources is What a team holds, behind content:manage.

POST /v1/teams

Creates a team with no members. Limited to 10 calls a minute and 60 an hour.

Field Type Required Notes
name string yes One line, up to 255 characters.
Terminal window
curl -X POST "https://api.mereon.ai/v1/teams" \
-H "Authorization: Bearer $MEREON_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Field crews" }'

201 Created. The team, and memberCount 0.

{
"id": "team_18c4...",
"name": "Field crews",
"memberCount": 0
}

PUT /v1/teams/{id}

name is required. The same limit as creating a team.

Terminal window
curl -X PUT "https://api.mereon.ai/v1/teams/team_18c4" \
-H "Authorization: Bearer $MEREON_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Yard crews" }'

200 OK. The team, and how many people are on it. Someone who has left is not counted.

DELETE /v1/teams/{id}

Deletes the team. The response includes how many people were on it. The same limit as creating a team.

Terminal window
curl -X DELETE "https://api.mereon.ai/v1/teams/team_18c4" \
-H "Authorization: Bearer $MEREON_TOKEN"

200 OK.

{
"id": "team_18c4...",
"name": "Yard crews",
"memberCount": 4
}

POST /v1/teams/{id}/members

Adds someone who already belongs to the organization. role is team-admin or team-viewer. Someone already on the team keeps their current role. A person outside the organization is refused with 403. The same limit as creating a team.

The assistant tool add_team_members adds several people at once, and each of them joins as team-viewer. This route sets the role for one person.

Field Type Required Notes
userId string yes From find people.
role string yes team-admin or team-viewer.
Terminal window
curl -X POST "https://api.mereon.ai/v1/teams/team_18c4/members" \
-H "Authorization: Bearer $MEREON_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "userId": "usr_44de", "role": "team-viewer" }'

201 Created.

{
"teamId": "team_18c4...",
"userId": "usr_44de...",
"role": "team-viewer"
}

DELETE /v1/teams/{id}/members/{userId}

Removes someone from the team. Refused with 400 when the removal would take away training their job still requires. Someone who is not on the team is refused with 404. The same limit as creating a team.

Terminal window
curl -X DELETE "https://api.mereon.ai/v1/teams/team_18c4/members/usr_44de" \
-H "Authorization: Bearer $MEREON_TOKEN"

200 OK. The membership that was removed, in the same shape as adding a person.

PUT /v1/teams/{id}/members/{userId}/role

Sets whether someone administers the team or belongs to it. They must already be on the team. Someone who is not is refused with 404. The same limit as creating a team.

Field Type Required Notes
role string yes team-admin or team-viewer.
Terminal window
curl -X PUT "https://api.mereon.ai/v1/teams/team_18c4/members/usr_44de/role" \
-H "Authorization: Bearer $MEREON_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "role": "team-admin" }'

200 OK. The membership, with the role that was stored.

Status When
400 The body is not the schema’s, or removing the person would take away training their job still requires.
403 The token lacks team:manage, the caller may not take that action on the team, or the person is not in the organization.
404 The team is not in this organization, or the person is not on the team.
429 More than 10 calls a minute, or 60 an hour, on that route. Retry-After says when to try again.