Reference
Fuselage
Channel Set Custom Fields
Sets the custom fields for the channel.
URL
Requires Auth
HTTP Method
/api/v1/channels.setCustomFields
yes
POST

Payload

One of roomId or roomName is required.
Argument
Example
Required
Description
roomId
GENERAL
Required
The channel's id
roomName
general
Required
The channel's name
customFields
{"organization": "tra-la-la"}
Required
The custom fields to set for the channel.

Example Call

1
curl -H "X-Auth-Token: 8h2mKAwxB3AQrFSjLVKMooJyjdCFaA7W45sWlHP8IzO" \
2
-H "X-User-Id: ew28FnZqipDpvKw3R" \
3
-H "Content-type: application/json" \
4
http://localhost:3000/api/v1/channels.setCustomFields \
5
-d '{"roomId": "GENERAL", "customFields":{"organization": "tra-la-la"} }'
Copied!

Example Result

1
{
2
"channel":{
3
"_id":"GENERAL",
4
"ts":"2018-02-18T19:41:02.875Z",
5
"t":"c",
6
"name":"general",
7
"msgs":236,
8
"default":true,
9
"_updatedAt":"2018-02-23T11:09:05.973Z",
10
"lm":"2018-02-18T22:18:20.288Z",
11
"customFields":{
12
"organization":"tra-la-la"
13
}
14
},
15
"success":true,
16
"developerWarning":"[WARNING]: The \"usernames\" field has been removed for performance reasons. Please use the \"*.members\" endpoint to get a list of members/users in a room."
17
}
Copied!

Change Log

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