Skip to main content
PUT
/
roles
/
{role}
Update
curl --request PUT \
  --url https://{appId}.api-{region}.cometchat.io/v3/roles/{role} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "",
  "description": "",
  "metadata": {
    "email": "admin@yourcompany.com"
  },
  "unset": [],
  "settings": []
}
'
{
  "data": {
    "role": "manager",
    "name": "manager",
    "description": "This role gives an update access",
    "metadata": {
      "email": "managers@gmail.com"
    },
    "settings": {
      "listUsers": "all",
      "sendMessagesTo": "friendsOnly"
    },
    "createdAt": 1638343994
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

For the complete error reference, see Error Guide.

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Path Parameters

role
string
required

A role to update.

Body

application/json
name
string
default:""

Friendly name of the role.

description
string
default:""

Description of the role.

metadata
object

Additional information about the role.

unset
enum<string>[]

The unsettable role attributes are settings, description and metadata.

Group attributes that can be unset.

Available options:
settings,
description,
metadata
settings
object

Role settings that is used for restricting list users/send message. Possible values for listUsers & sendMessagesTo are all and friendsOnly

Response

200 - application/json

Updated Role

data
object