In Rocket.Chat, teams are a group of channels used to simplify communications. With the Teams API, you can:
Create public and private teams.
Manage team members by adding and removing them, and updating member information.
Convert a team to a channel and add rooms to a team.
For details, refer to the Teams user guide.
The team object
Team endpoints return a team object. A trimmed example from Get Team Info:
{
"teamInfo": {
"_id": "607e0d9b49d493189836bfac",
"name": "Team1",
"type": 1,
"createdAt": "2021-04-19T23:09:15.106Z",
"createdBy": { "_id": "FL2fZL4ERhwA3gWiS", "username": "some.username" },
"roomId": "Dgh2xwJ3NFKWvKSqY"
},
"success": true
}Fields you use most often:
_id: The team ID. Pass it asteamIdin requests; most team endpoints also acceptteamName.type:0for a public team,1for a private team.roomId: The team's main channel. It is a regular room, so room and channel endpoints work on it.createdBy: The user who created the team.
Common workflows
Set up a team
Create the team with a name, type, and optional initial members.
Add members, and update a member's roles to make them a team owner where needed.
Add existing channels to the team to bring related conversations under it.
Explore a team's rooms
List your teams or get a team's info to find its
teamId.Update a room in the team, or remove a room to detach it.
Wind a team down
Convert the team back to a channel if the extra structure is no longer needed.
Delete the team, choosing which of its channels to delete with it.
Conventions
Most endpoints accept either
teamIdorteamName. UsingteamIdis safer because team names can change.A team is built on a main channel: the team object's
roomIdpoints to it, and team membership is separate from membership of individual channels in the team.Creating teams requires the
create-teampermission; managing members and rooms requires team owner rights or admin-level permissions. Each endpoint page lists its required permissions.List endpoints support
count,offset,sort, andqueryquery parameters.