Sets Group Custom Fields
    • Dark
      Light
    • PDF

    Sets Group Custom Fields

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/groups.setCustomFields

    Sets the custom fields for the private group.

    Changelog

    VersionDescription
    0.62.0Added
    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.

    customFields
    objectRequired

    The custom fields to set for the private group.

    Responses
    200

    OK

    Example 1
    {
      "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."
    }
    Expand All
    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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.