List Role Permissions
curl --request GET \
--url https://{appId}.api-{region}.cometchat.io/v3/roles/{role}/permissions \
--header 'apikey: <api-key>'{
"data": [
{
"id": "createGroup",
"type": "role",
"title": "Allows/Denies creating groups",
"description": "Allows/Denies creating groups",
"dataType": "string",
"availableValues": [
"allow",
"deny"
],
"defaultValue": "allow",
"createdAt": 1765962204,
"updatedAt": 1765962204
},
{
"id": "sendMessage",
"type": "role",
"title": "Allows/Denies sending messages",
"description": "Allows/Denies sending messages",
"dataType": "string",
"availableValues": [
"allow",
"deny"
],
"defaultValue": "allow",
"createdAt": 1765962204,
"updatedAt": 1765962204
},
{
"id": "sendMessage.allowedMessageTypes",
"type": "role",
"title": "Allows sending messages of the specified types",
"description": "Allows sending messages of the specified types",
"dataType": "stringArray",
"availableValues": [
"text",
"image",
"audio",
"video",
"file"
],
"createdAt": 1765962204,
"updatedAt": 1765962204,
"defaultValue": []
}
],
"meta": {
"pagination": {
"total": 28,
"count": 28,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
}
}Role Based Access Control
List Role Permissions
Lists role permissions
GET
/
roles
/
{role}
/
permissions
List Role Permissions
curl --request GET \
--url https://{appId}.api-{region}.cometchat.io/v3/roles/{role}/permissions \
--header 'apikey: <api-key>'{
"data": [
{
"id": "createGroup",
"type": "role",
"title": "Allows/Denies creating groups",
"description": "Allows/Denies creating groups",
"dataType": "string",
"availableValues": [
"allow",
"deny"
],
"defaultValue": "allow",
"createdAt": 1765962204,
"updatedAt": 1765962204
},
{
"id": "sendMessage",
"type": "role",
"title": "Allows/Denies sending messages",
"description": "Allows/Denies sending messages",
"dataType": "string",
"availableValues": [
"allow",
"deny"
],
"defaultValue": "allow",
"createdAt": 1765962204,
"updatedAt": 1765962204
},
{
"id": "sendMessage.allowedMessageTypes",
"type": "role",
"title": "Allows sending messages of the specified types",
"description": "Allows sending messages of the specified types",
"dataType": "stringArray",
"availableValues": [
"text",
"image",
"audio",
"video",
"file"
],
"createdAt": 1765962204,
"updatedAt": 1765962204,
"defaultValue": []
}
],
"meta": {
"pagination": {
"total": 28,
"count": 28,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
}
}For the complete error reference, see Error Guide.
Authorizations
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Path Parameters
The role identifier to update permissions for
Example:
"default"
Was this page helpful?
⌘I