> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Roles API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

To retrieve the list of bot or admin roles available in an account.

<Note>
  This API requires a JWT generated by an application created only from the Admin Console.
</Note>

| Field             | Value                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | GET                                                                                                                              |
| **Endpoint**      | `https://{{host}}/api/public/roles?roleType=bot&limit=2`                                                                         |
| **Content Type**  | `application/json`                                                                                                               |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction/#generating-the-jwt-token). |
| **API Scope**     | App Builder: Not Applicable; Admin Console: Profile Management > Role Management                                                 |

## Path Parameters

| Parameter  | Required | Description                                               |
| ---------- | -------- | --------------------------------------------------------- |
| `host`     | Required | Environment URL, for example, `https://platform.kore.ai`. |
| `roleType` | Required | The role type: `admin` or `bot`.                          |
| `limit`    | Optional | Number of records to fetch. Maximum is 50.                |

## Sample Request

```bash theme={null}
curl -X GET \
  'https://{{host}}/api/public/roles?roleType=bot&limit=2' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'
```

## Sample Response (Admin)

```json theme={null}
{
    "total": 2,
    "availableMore": false,
    "roles": [
        {
            "roleType": "admin",
            "role": "admin",
            "rDesc": "Master administration role with full control on account activity",
            "permissions": {
                "Invite": "YES",
                "Manage User Profile Fields": "YES",
                "Manage Groups": "YES",
                "Single Sign On": "YES",
                "Manage Built-In Admin Roles": "YES",
                "Manage Custom Admin Roles": "YES",
                "View and Run Audit Reports": "YES"
            }
        }
    ]
}
```

## Sample Response (Bot)

```json theme={null}
{
    "total": 5,
    "availableMore": true,
    "roles": [
        {
            "roleType": "bot",
            "_id": "6495a4d56ca3571b556xxxxx",
            "role": "Bot Owner",
            "rDesc": "Role of bot owners with full access to bot definition",
            "permissions": {
                "Tasks": ["FULL"],
                "Natural Language": ["FULL"],
                "Knowledge Graph": ["FULL"],
                "Bot Settings": ["FULL"],
                "Bot Import": ["YES"],
                "Publish bot": ["YES"],
                "Channels": ["YES"]
            }
        },
        {
            "roleType": "bot",
            "_id": "6495a4d56ca3571b556xxxxx",
            "role": "Bot Developer",
            "rDesc": "Role for bot co-developers",
            "permissions": {
                "Tasks": ["FULL"],
                "Natural Language": ["FULL"],
                "Bot Settings": ["FULL"],
                "Publish bot": ["YES"],
                "Channels": ["YES"]
            }
        }
    ]
}
```
