---
title: List Roles
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api)

[Accounts](https://developers.cloudflare.com/api/resources/accounts)

[Roles](https://developers.cloudflare.com/api/resources/accounts/subresources/roles)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List Roles

Deprecated: Use /accounts/{account\_id}/iam/permission\_groups instead.

GET/accounts/{account\_id}/roles

Get all available roles for an account.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`SCIM Provisioning``Account Settings Write``Account Settings Read`

##### P ath ParametersExpand Collapse

account\_id: string

Account identifier tag.

maxLength32

minLength32

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

##### Q uery ParametersExpand Collapse

page: optional number

Page number of paginated results.

minimum1

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page%20%3E%20(schema)>)

per\_page: optional number

Number of roles per page.

maximum50

minimum5

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

errors: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors>)

<details>

<summary>

messages: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages>)

success: true

Whether the API call was successful.

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20success>)

<details>

<summary>

result: optional array of <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)">Role</a> { id, description, name, permissions }

</summary>

id: string

Role identifier tag.

maxLength32

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description: string

Description of role’s permissions.

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

name: string

Role name.

maxLength120

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

permissions: object {analytics, billing, cache\_purge, 9 more }

</summary>

<details>

<summary>

analytics: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics">Link to this property</a>

<details>

<summary>

billing: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing">Link to this property</a>

<details>

<summary>

cache\_purge: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge">Link to this property</a>

<details>

<summary>

dns: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns">Link to this property</a>

<details>

<summary>

dns\_records: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records">Link to this property</a>

<details>

<summary>

lb: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb">Link to this property</a>

<details>

<summary>

logs: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs">Link to this property</a>

<details>

<summary>

organization: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization">Link to this property</a>

<details>

<summary>

ssl: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl">Link to this property</a>

<details>

<summary>

waf: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf">Link to this property</a>

<details>

<summary>

zone\_settings: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings">Link to this property</a>

<details>

<summary>

zones: optional <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)">PermissionGrant</a> { read, write }

</summary>

read: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: optional boolean

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result>)

<details>

<summary>

result\_info: optional object {count, page, per\_page, total\_count }

</summary>

count: optional number

Total number of results for the requested service

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20count">Link to this property</a>

page: optional number

Current page within paginated list of results

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20page">Link to this property</a>

per\_page: optional number

Number of results per page of results

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20per_page">Link to this property</a>

total\_count: optional number

Total results available without any search parameters

<a href="#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20total_count">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info>)

### List Roles

HTTP

HTTPTypeScriptPythonGoTerraform

```
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/roles \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY"
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "3536bcfad5faccb999b47003c79917fb",
      "description": "Administrative access to the entire Account",
      "name": "Account Administrator",
      "permissions": {
        "analytics": {
          "read": true,
          "write": false
        },
        "billing": {
          "read": true,
          "write": false
        },
        "cache_purge": {
          "read": true,
          "write": false
        },
        "dns": {
          "read": true,
          "write": false
        },
        "dns_records": {
          "read": true,
          "write": false
        },
        "lb": {
          "read": true,
          "write": false
        },
        "logs": {
          "read": true,
          "write": false
        },
        "organization": {
          "read": true,
          "write": false
        },
        "ssl": {
          "read": true,
          "write": false
        },
        "waf": {
          "read": true,
          "write": false
        },
        "zone_settings": {
          "read": true,
          "write": false
        },
        "zones": {
          "read": true,
          "write": true
        }
      }
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "3536bcfad5faccb999b47003c79917fb",
      "description": "Administrative access to the entire Account",
      "name": "Account Administrator",
      "permissions": {
        "analytics": {
          "read": true,
          "write": false
        },
        "billing": {
          "read": true,
          "write": false
        },
        "cache_purge": {
          "read": true,
          "write": false
        },
        "dns": {
          "read": true,
          "write": false
        },
        "dns_records": {
          "read": true,
          "write": false
        },
        "lb": {
          "read": true,
          "write": false
        },
        "logs": {
          "read": true,
          "write": false
        },
        "organization": {
          "read": true,
          "write": false
        },
        "ssl": {
          "read": true,
          "write": false
        },
        "waf": {
          "read": true,
          "write": false
        },
        "zone_settings": {
          "read": true,
          "write": false
        },
        "zones": {
          "read": true,
          "write": true
        }
      }
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```