Create New Team

HTTP MethodURLRequires Auth

POST

/api/v1/teams.create

Permission required: create-team

Body Parameters

KeyExample ValueDescription

name*

TeamName

The team name.

type*

0 or 1

Privacy of the team (0 - Public, 1 - Private).

members

["8dugqGhuRvCBLdZft"]

The user IDs to add to the team when it is created.

room

{ readOnly: true }

Additional options used to create the main team channel.

owner

CkCPNcvfmWLqC

Set the owner of the team.

Example Call

curl  -H "X-Auth-Token: 8h2mKAwxB3AQrFSjLVKMooJyjdCFaA7W45sWlHP8IzO" \
      -H "X-User-Id: ew28FnZqipDpvKw3R" \
      -H "Content-type: application/json" \
      http://localhost:3000/api/v1/teams.create \
      -d '{ 
            "name": "teamName", 
            "type": 0 }'

Example Response

{
  "team": {
    "_id": "608876e583314b02c8e6d857",
    "name": "teamName",
    "type": 0,
    "createdAt": "2021-04-27T20:41:09.738Z",
    "createdBy": {
      "_id": "FL2fZL4ERhwA3gWiS",
      "username": "some.username"
    },
    "_updatedAt": "2021-04-27T20:41:09.738Z",
    "roomId": "yv9KEJdTFjmerZprx"
  },
  "success": true
}

roomId is the team's main room's id.

Last updated

Rocket.Chat versions receive support for six months after release.