Reference
Fuselage
Channel Set Type
Sets the type of room this channel should be.
URL
Requires Auth
HTTP Method
/api/v1/channels.setType
yes
POST

Payload

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The channel's id
roomName
chat-room-name
Required
The channel's name
type
c or p
Required
The type of room this channel should be, either c or p. c is for channel and p is for private.

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
-H "Content-type: application/json" \
4
http://localhost:3000/api/v1/channels.setType \
5
-d '{ "roomId": "ByehQjC44FwMeiLbX", "type": "p" }'
6
7
or
8
9
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
10
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
11
-H "Content-type: application/json" \
12
http://localhost:3000/api/v1/channels.setType \
13
-d '{ "roomName": "chat-room-name", "type": "p" }'
Copied!

Example Result

1
{
2
"channel": {
3
"_id": "ByehQjC44FwMeiLbX",
4
"name": "testing0",
5
"t": "p",
6
"msgs": 0,
7
"u": {
8
"_id": "aiPqNoGkjpNDiRx6d",
9
"username": "goose160"
10
},
11
"ts": "2017-01-05T18:02:50.754Z",
12
"ro": false,
13
"sysMes": true,
14
"_updatedAt": "2017-01-05T19:02:24.429Z",
15
"usernames": [
16
"goose160",
17
"graywolf336"
18
],
19
"joinCodeRequired": true,
20
"muted": []
21
},
22
"success": true
23
}
Copied!

Change Log

Version
Description
0.49.0
Added
Last modified 8mo ago
Export as PDF
Copy link
Edit on GitHub