Sets Group Custom Fields
- Print
- DarkLight
- PDF
Sets Group Custom Fields
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/groups.setCustomFields
Sets the custom fields for the private group.
Changelog
Version | Description |
---|---|
0.62.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
"roomId": "euzoT67Gx6nXcn66M",
"customFields": {
"company": "sell-and-more"
}
}
object
roomId
string Required
The private group's ID. Alternatively, use the roomName
parameter and provide the room's name as the value.
customFields
object Required
The custom fields to set for the private group.
Responses
200
OK
Success
{
"group": {
"_id": "euzoT67Gx6nXcn66M",
"name": "channel.cf.1518990680083",
"fname": "channel.cf.1518990680083",
"t": "p",
"msgs": 0,
"u": {
"_id": "ew28FnZqipDpvKw3R",
"username": "rocketchat.internal.admin.test"
},
"customFields": {
"company": "sell-and-more"
},
"ts": "2018-02-18T21:51:20.091Z",
"ro": false,
"sysMes": true,
"_updatedAt": "2018-02-23T11:27:01.411Z",
"username": "rocketchat.internal.admin.test"
},
"success": true,
"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."
}
object
group
object
_id
string
name
string
fname
string
t
string
msgs
integer
u
object
_id
string
username
string
customFields
object
company
string
ts
string
ro
boolean
sysMes
boolean
_updatedAt
string
username
string
success
boolean
developerWarning
string
Was this article helpful?