Skip to main content
PUT
/
groups
/
{guid}
/
scopes
/
{scope}
/
permissions
Set Scope Permissions
curl --request PUT \
  --url https://{appId}.api-{region}.cometchat.io/v3/groups/{guid}/scopes/{scope}/permissions \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "permissions": {
    "sendMessage": "deny",
    "initiateCall": "friends"
  }
}
'
{
  "data": {
    "sendMessage": {
      "success": true,
      "message": "Permission with id sendMessage have been mapped successfully to scope admin on group cometchat-guid-1."
    },
    "permissions": {
      "sendMessage": "allow",
      "listMembers": "allow",
      "listMembers.allowedScopes": "participant",
      "addReaction": "deny",
      "listReactions.allowedScopes": "moderator",
      "listReactions": "deny",
      "sendThreadedMessage": "allow",
      "initiateCall": "deny",
      "initiateCall.allowedScopes": "participant",
      "initiateCall.allowedType": "audio",
      "editMessage": "allow"
    }
  }
}

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

guid
string
required

The group GUID to update scope permissions for

Example:

"supergroup"

scope
string
required

The scope identifier (e.g., admin, moderator, participant)

Example:

"admin"

Body

application/json
permissions
object
required

Permissions object containing key-value pairs for scope permissions

Example:
{
  "sendMessage": "deny",
  "initiateCall": "friends"
}

Response

200 - application/json

Scope permissions updated successfully

data
object