Reference
Fuselage
Channel Set Default
Sets whether the channel is a default channel or not.
URL
Requires Auth
HTTP Method
/api/v1/channels.setDefault
yes
POST

Payload

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The channel's id
default
true
Required
Boolean of whether the room is default or not.

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.setDefault \
5
-d '{ "roomId": "ByehQjC44FwMeiLbX", "default": true }'
Copied!

Example Result

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

Change Log

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