GET
/
roles
List
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/roles \
  --header 'apikey: <api-key>'
{
  "data": [
    {
      "role": "manager",
      "name": "manager",
      "description": "This role gives an update access",
      "metadata": {
        "email": "managers@gmail.com"
      },
      "settings": {
        "listUsers": "all",
        "sendMessagesTo": "friendsOnly"
      },
      "createdAt": 1638343994
    },
    {
      "role": "default",
      "name": "Default Role",
      "description": "This role gives full access ",
      "createdAt": 1629869270,
      "updatedAt": 1630306291
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 1
    }
  }
}

Authorizations

apikey
string
header
required

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

Response

200 - application/json

Lists the user roles

The response is of type object.