> ## 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.

# Export Roles API

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

Exports bot or admin roles from an account. Typically used to export roles from one environment to another.

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

| Property          | Value                                                                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | GET                                                                                                                                |
| **Endpoint**      | `https://{{host}}/api/public/roles/export?roleType=admin`                                                                          |
| **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`                          |

## Sample Request

```json theme={null}
curl -X GET \
  'https://{{host}}/api/public/roles/export?roleType=bot' \
  -H 'Content-Type: application/json' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'
```

## Sample Response

```json theme={null}
[
    {
        "roleType": "admin",
        "_id": "5bd057cc2515025b2a4xxxxx",
        "role": "admin",
        "rDesc": "Master administration role with full control on account activity",
        "permissions": {
            "Invite": "YES",
            "Import Users / Sync": "YES",
            "Directory Sync": "YES",
            "Manage User Profile Fields": "YES",
            "Manage Groups": "YES",
            "Manage Deployment": "YES",
            "Enterprise Bots": "YES",
            "Password Policies": "YES",
            "Single Sign On": "YES",
            "Domain Management": "YES",
            "Kore.ai Connector": "YES",
            "Manage Built-In Admin Roles": "YES",
            "Manage Custom Admin Roles": "YES",
            "View and Run Audit Reports": "YES",
            "Consumer Bots": "YES",
            "View and Run Bot Chat History": "YES",
            "Manage Bot Roles": "YES",
            "Preferences": "YES",
            "Smart Bots": "YES",
            "API Scopes": "YES",
            "Enterprise Key": "YES"
        },
        "refId": "891ce307-f69f-5b9b-9c92-3945ce2xxxxx"
    }
]
```
