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.
Create a team
Section titled “Create a team”POST /v1/teams
Creates a team with no members. Limited to 10 calls a minute and 60 an hour.
Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
name |
string | yes | One line, up to 255 characters. |
Request
Section titled “Request”curl -X POST "https://api.mereon.ai/v1/teams" \ -H "Authorization: Bearer $MEREON_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Field crews" }'Response
Section titled “Response”201 Created. The team, and memberCount 0.
{ "id": "team_18c4...", "name": "Field crews", "memberCount": 0}Rename a team
Section titled “Rename a team”PUT /v1/teams/{id}
name is required. The same limit as creating a team.
Request
Section titled “Request”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" }'Response
Section titled “Response”200 OK. The team, and how many people are on it. Someone who has left is not counted.
Delete a team
Section titled “Delete a team”DELETE /v1/teams/{id}
Deletes the team. The response includes how many people were on it. The same limit as creating a team.
Request
Section titled “Request”curl -X DELETE "https://api.mereon.ai/v1/teams/team_18c4" \ -H "Authorization: Bearer $MEREON_TOKEN"Response
Section titled “Response”200 OK.
{ "id": "team_18c4...", "name": "Yard crews", "memberCount": 4}Add a person
Section titled “Add a person”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.
Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
userId |
string | yes | From find people. |
role |
string | yes | team-admin or team-viewer. |
Request
Section titled “Request”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" }'Response
Section titled “Response”201 Created.
{ "teamId": "team_18c4...", "userId": "usr_44de...", "role": "team-viewer"}Remove a person
Section titled “Remove a person”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.
Request
Section titled “Request”curl -X DELETE "https://api.mereon.ai/v1/teams/team_18c4/members/usr_44de" \ -H "Authorization: Bearer $MEREON_TOKEN"Response
Section titled “Response”200 OK. The membership that was removed, in the same shape as adding a person.
Set a team role
Section titled “Set a team role”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.
Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
role |
string | yes | team-admin or team-viewer. |
Request
Section titled “Request”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" }'Response
Section titled “Response”200 OK. The membership, with the role that was stored.
Errors
Section titled “Errors”| 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. |