---
title: "Set Group Custom Fields"
slug: "sets-group-custom-fields"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Group Custom Fields

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 parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Body parameters<select class='api-response-data' aria-label='Media type'><option value='a69c44fe-79bc-4ec0-a26e-b62f107aad49'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='422fc9f7-db6a-482e-a6f9-279afbdc3483'>Example</option>
</select>Example

```json
{
  "roomId": "euzoT67Gx6nXcn66M",
  "customFields": {
    "company": "sell-and-more"
  }
}
```

Expand Allobject  roomIdstring    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](https://developer.rocket.chat/apidocs/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](https://developer.rocket.chat/apidocs/get-groups): This endpoint returns the private channels that you are a member of.

ExampleeuzoT67Gx6nXcn66M
customFieldsobject  Required

The custom fields to set for the private group.

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='2ecc40d4-c17a-4ab4-b660-3743f562a320'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='461d1bd0-ff83-4f39-b1e5-15be8f567842'>Success</option>
</select>Success

```json
{
  "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 Allobject  groupobject  _idstring    
fnamestring    
_updatedAtstring    
namestring    
tstring    
msgsinteger    
usersCountinteger    
uobject  _idstring    
usernamestring    
namestring    

tsstring    
roboolean    
sidepanelobject  items Array of string   string    

teamIdstring    
teamMainboolean    
rolePrioritiesCreatedinteger    
lastMessageobject  _idstring    
ridstring    
msgstring    
tsstring    
uobject  _idstring    
usernamestring    
namestring    

_updatedAtstring    
urls Array of object   object  
mentions Array of object   object  
channels Array of object   object  
md Array of object   object  typestring    
value Array of object   object  typestring    
valuestring    

lmstring    
encryptedboolean    
e2eKeyIdstring    
retentionobject  enabledboolean    
overrideGlobalboolean    

announcementstring    
announcementDetailsstring    
customFieldsobject  companystring    

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='0d86f9e0-c763-40ab-890c-05502de26e7e'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='8e14859a-1ce6-48b9-ba35-3895e74023f4'>Example 1</option>
<option value='59d8c38b-86d7-441f-9938-1801b105fe7b'>Example 2</option>
</select>Example 1

```json
{
  "success": false,
  "error": "The bodyParam \"customFields\" is required with a type like object."
}
```

Example 2

```json
{
  "success": false,
  "error": "The parameter \"roomId\" or \"roomName\" is required [error-room-param-not-provided]",
  "errorType": "error-room-param-not-provided"
}
```

object  successboolean    
errorstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='12e7aa4c-ee22-49fe-9a32-abe80483c841'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='da9a2772-24db-4740-ace1-0b254a90cc07'>Authorization Error</option>
</select>Authorization Error

```json
{
  "status": "error",
  "message": "You must be logged in to do this."
}
```

object  statusstring    
messagestring
