---
title: Get Zone Entitlements
---

[Skip to content](#_top)

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

[Zones](https://developers.cloudflare.com/api/go/resources/zones)

[Entitlements](https://developers.cloudflare.com/api/go/resources/zones/subresources/entitlements)

Copy Markdown

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

---

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

# Get Zone Entitlements

client.Zones.Entitlements.List(ctx, query) (\*SinglePage\[[EntitlementListResponse](<https://developers.cloudflare.com/api/go/resources/zones#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/entitlements

Returns the list of entitlements (features and their allocations) for a given zone. Each entitlement describes a product feature the zone is permitted to use and the allocation value (boolean, count, range, enum, or string) that governs its behaviour.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

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

`Zone Read`

##### ParametersExpand Collapse

<details>

<summary>

query EntitlementListParams

</summary>

ZoneID param.Field\[string]

Identifier tag.

maxLength32

minLength32

<a href="#(resource)%20zones.entitlements%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.entitlements%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type EntitlementListResponse struct{…}

A single entitlement record for a zone or account.

</summary>

ID string

Entitlement identifier — equal to the feature key.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

Allocation EntitlementListResponseAllocation

Represents the allocation value for an entitlement. The shape of <code>value</code> depends on <code>type</code>: <code>bool</code> uses a boolean, <code>max_count</code> uses an integer, <code>enum_number</code> uses an array of numbers, <code>range</code> uses an object with <code>min</code> and <code>max</code> integer fields, and <code>string</code> uses a string.

</summary>

<details>

<summary>

Type EntitlementListResponseAllocationType

Allocation type discriminator.

</summary>

One of the following:

const EntitlementListResponseAllocationTypeBool EntitlementListResponseAllocationType = "bool"

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

const EntitlementListResponseAllocationTypeMaxCount EntitlementListResponseAllocationType = "max\_count"

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

const EntitlementListResponseAllocationTypeEnumNumber EntitlementListResponseAllocationType = "enum\_number"

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

const EntitlementListResponseAllocationTypeRange EntitlementListResponseAllocationType = "range"

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type%20%3E%20(member)%203">Link to this property</a>

const EntitlementListResponseAllocationTypeString EntitlementListResponseAllocationType = "string"

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20type">Link to this property</a>

<details>

<summary>

Value EntitlementListResponseAllocationValueUnion

Contains the allocation value whose concrete type the <code>type</code> field determines: bool yields a boolean, max\_count yields an integer, enum\_number yields an array of numbers, range yields an object with <code>min</code> and <code>max</code>, and string yields a string.

</summary>

One of the following:

UnionBool

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%200">Link to this property</a>

UnionInt

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%201">Link to this property</a>

UnionString

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%202">Link to this property</a>

type EntitlementListResponseAllocationValueArray \[]float64

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

type EntitlementListResponseAllocationValueObject struct{…}

</summary>

Max int64

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%204%20%3E%20(property)%20max">Link to this property</a>

Min int64

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%204%20%3E%20(property)%20min">Link to this property</a>

</details>

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value%20%3E%20(variant)%204">Link to this property</a>

</details>

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20allocation">Link to this property</a>

CreatedDate string

ISO 8601 timestamp (microsecond precision, no timezone offset) when the entitlement was created. Format: <code>YYYY-MM-DDTHH:MM:SS.ffffff</code>.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20created_date">Link to this property</a>

DeletedDate string

ISO 8601 timestamp when the entitlement was deleted, or empty string if not deleted.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20deleted_date">Link to this property</a>

EditedDate string

ISO 8601 timestamp (microsecond precision, no timezone offset) when the entitlement was last edited.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20edited_date">Link to this property</a>

<details>

<summary>

Feature EntitlementListResponseFeature

Describes a product feature associated with an entitlement.

</summary>

ID int64

Numeric identifier of the feature.

formatint64

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20feature%20%3E%20(property)%20id">Link to this property</a>

FeatureSet string

The logical grouping (set) this feature belongs to.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20feature%20%3E%20(property)%20feature_set">Link to this property</a>

Key string

Unique string key for the feature.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20feature%20%3E%20(property)%20key">Link to this property</a>

Name string

Human-readable name of the feature.

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20feature%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)%20%3E%20(property)%20feature">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zones.entitlements%20%3E%20(model)%20EntitlementListResponse%20%3E%20(schema)>)

### Get Zone Entitlements

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zones"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Zones.Entitlements.List(context.TODO(), zones.EntitlementListParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

200 example

400 example

404 example

405 example

500 example

503 example

```
{
  "errors": [],
  "messages": [],
  "result": [
    {
      "allocation": {
        "type": "max_count",
        "value": 3
      },
      "created_date": "2021-09-17T20:33:36.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:34:01.000000",
      "feature": {
        "feature_set": "page_rules",
        "id": 1,
        "key": "page_rules",
        "name": "Page Rules"
      },
      "id": "page_rules"
    },
    {
      "allocation": {
        "type": "bool",
        "value": true
      },
      "created_date": "2021-09-17T20:39:02.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:39:11.000000",
      "feature": {
        "feature_set": "argo",
        "id": 38,
        "key": "argo.allow_tiered_caching",
        "name": "Argo Tiered Cache"
      },
      "id": "argo.allow_tiered_caching"
    },
    {
      "allocation": {
        "type": "enum_number",
        "value": [
          10,
          60,
          600,
          3600
        ]
      },
      "created_date": "2021-09-17T20:47:36.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:47:43.000000",
      "feature": {
        "feature_set": "rate_limiting",
        "id": 32,
        "key": "rate_limiting.sampling_period_secs",
        "name": "rate_limiting.sampling_period_secs"
      },
      "id": "rate_limiting.sampling_period_secs"
    }
  ],
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 2005,
      "message": "failed to fetch entitlements: invalid object type"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2004,
      "message": "failed to fetch entitlements: unknown route"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2001,
      "message": "failed to fetch entitlements: method not allowed"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2000,
      "message": "failed to fetch entitlements: internal server error"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2003,
      "message": "failed to fetch entitlements: timeout occurred"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

##### Returns Examples

200 example

400 example

404 example

405 example

500 example

503 example

```
{
  "errors": [],
  "messages": [],
  "result": [
    {
      "allocation": {
        "type": "max_count",
        "value": 3
      },
      "created_date": "2021-09-17T20:33:36.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:34:01.000000",
      "feature": {
        "feature_set": "page_rules",
        "id": 1,
        "key": "page_rules",
        "name": "Page Rules"
      },
      "id": "page_rules"
    },
    {
      "allocation": {
        "type": "bool",
        "value": true
      },
      "created_date": "2021-09-17T20:39:02.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:39:11.000000",
      "feature": {
        "feature_set": "argo",
        "id": 38,
        "key": "argo.allow_tiered_caching",
        "name": "Argo Tiered Cache"
      },
      "id": "argo.allow_tiered_caching"
    },
    {
      "allocation": {
        "type": "enum_number",
        "value": [
          10,
          60,
          600,
          3600
        ]
      },
      "created_date": "2021-09-17T20:47:36.000000",
      "deleted_date": "",
      "edited_date": "2021-09-17T20:47:43.000000",
      "feature": {
        "feature_set": "rate_limiting",
        "id": 32,
        "key": "rate_limiting.sampling_period_secs",
        "name": "rate_limiting.sampling_period_secs"
      },
      "id": "rate_limiting.sampling_period_secs"
    }
  ],
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 2005,
      "message": "failed to fetch entitlements: invalid object type"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2004,
      "message": "failed to fetch entitlements: unknown route"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2001,
      "message": "failed to fetch entitlements: method not allowed"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2000,
      "message": "failed to fetch entitlements: internal server error"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 2003,
      "message": "failed to fetch entitlements: timeout occurred"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```