Set Group Type

Sets the type of room this group/channel should be.

HTTP MethodURLRequires Auth

POST

/api/v1/groups.setType

Body Parameters

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The group ID.

type*

c or p

The type of room this group should be, either c or p.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     http://localhost:3000/api/v1/groups.setType \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX", 
          "type": "c" }'

Example Response

{
    "group": {
        "_id": "ByehQjC44FwMeiLbX",
        "name": "testing0",
        "t": "c",
        "msgs": 0,
        "u": {
            "_id": "aiPqNoGkjpNDiRx6d",
            "username": "goose160"
        },
        "ts": "2017-01-05T18:02:50.754Z",
        "ro": false,
        "sysMes": true,
        "_updatedAt": "2017-01-05T19:02:24.429Z",
        "usernames": [
            "goose160",
            "graywolf336"
        ],
        "joinCodeRequired": true,
        "muted": []
    },
    "success": true
}

Change Log

VersionDescription

0.49.0

Added

Last updated

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