Set Group Custom Fields

Prev Next
Post
/api/v1/groups.setCustomFields

Set custom fields for the private channel. These custom fields are not displayed on the workspace UI. Permission required: edit-room

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"
  }
}
Expand All
object
roomId
string Required

The private group's ID. Alternatively, use the roomName parameter and provide the room's name as the value. You can find the IDs by using any of the following endpoints:

  • Get List of User Groups: This endpoint returns all private channels in the workspace, if you have the required permissions to view them.
  • Get Groups: This endpoint returns the private channels that you are a member of.
ExampleeuzoT67Gx6nXcn66M
customFields
object Required

The custom fields to set for the private group.

Responses
200

OK

Success
{
  "group": {
    "_id": "66c88dae237405fc05fc1f06",
    "fname": "api-team2",
    "_updatedAt": "2025-11-20T08:26:12.813Z",
    "name": "api-team2",
    "t": "p",
    "msgs": 17,
    "usersCount": 2,
    "u": {
      "_id": "C38WSSzrGd2NCjzqJ",
      "username": "test.cat",
      "name": "test.cat"
    },
    "ts": "2024-08-23T13:25:02.959Z",
    "ro": false,
    "sidepanel": {
      "items": [
        "discussions"
      ]
    },
    "teamId": "66c88daf237405fc05fc1f08",
    "teamMain": true,
    "rolePrioritiesCreated": 2,
    "lastMessage": {
      "_id": "3yXev48EfPnBwfvDN",
      "rid": "66c88dae237405fc05fc1f06",
      "msg": "hello world",
      "ts": "2025-10-28T06:32:52.861Z",
      "u": {
        "_id": "C38WSSzrGd2NCjzqJ",
        "username": "test.cat",
        "name": "Test Cat"
      },
      "_updatedAt": "2025-10-28T06:32:52.983Z",
      "urls": [],
      "mentions": [],
      "channels": [],
      "md": [
        {
          "type": "PARAGRAPH",
          "value": [
            {
              "type": "PLAIN_TEXT",
              "value": "hello world"
            }
          ]
        }
      ]
    },
    "lm": "2025-10-28T06:32:52.861Z",
    "encrypted": false,
    "e2eKeyId": "8ee4c64e1012",
    "retention": {
      "enabled": false,
      "overrideGlobal": false
    },
    "announcement": "testing announcement",
    "announcementDetails": null,
    "customFields": {
      "company": "sell-and-more"
    }
  },
  "success": true
}
Expand All
object
group
object
_id
string
fname
string
_updatedAt
string
name
string
t
string
msgs
integer
usersCount
integer
u
object
_id
string
username
string
name
string
ts
string
ro
boolean
sidepanel
object
items
Array of string
string
teamId
string
teamMain
boolean
rolePrioritiesCreated
integer
lastMessage
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
_updatedAt
string
urls
Array of object
object
mentions
Array of object
object
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
lm
string
encrypted
boolean
e2eKeyId
string
retention
object
enabled
boolean
overrideGlobal
boolean
announcement
string
announcementDetails
string
customFields
object
company
string
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "The bodyParam \"customFields\" is required with a type like object."
}
Example 2
{
  "success": false,
  "error": "The parameter \"roomId\" or \"roomName\" is required [error-room-param-not-provided]",
  "errorType": "error-room-param-not-provided"
}
object
success
boolean
error
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string