---
title: Update Zero Trust list
---

[Skip to content](#_top)

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

[Zero Trust](https://developers.cloudflare.com/api/typescript/resources/zero_trust)

[Gateway](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/gateway)

[Lists](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/gateway/subresources/lists)

Copy Markdown

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

---

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

# Update Zero Trust list

client.zeroTrust.gateway.lists.update(stringlistID, ListUpdateParams {account\_id, name, description, items } params, RequestOptionsoptions?): [GatewayList](<https://developers.cloudflare.com/api/typescript/resources/zero_trust#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)>) {id, count, created\_at, 5 more }

PUT/accounts/{account\_id}/gateway/lists/{list\_id}

Updates a configured Zero Trust list. Skips updating list items if not included in the payload. A non empty list items will overwrite the existing list.

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

##### ParametersExpand Collapse

listID: string

Identify the API resource with a UUID.

maxLength36

[Link to this property](<#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20list_id%20%3E%20(schema)>)

<details>

<summary>

params: ListUpdateParams {account\_id, name, description, items }

</summary>

account\_id: string

Path param: Specify the Cloudflare account identifier.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

name: string

Body param: Specify the list name.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20name">Link to this property</a>

description?: string

Body param: Provide the list description.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20description">Link to this property</a>

<details>

<summary>

items?: Array&lt;Item&gt;

Body param: Add items to the list.

</summary>

description?: string

Provide the list item description (optional).

minimum0

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20description">Link to this property</a>

value?: string

Specify the item value.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20items">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.gateway.lists%20%3E%20(method)%20update%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

GatewayList {id, count, created\_at, 5 more }

</summary>

id?: string

Identify the API resource with a UUID.

maxLength36

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

count?: number

Indicate the number of items in the list.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20count">Link to this property</a>

created\_at?: string

formatdate-time

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

description?: string

Provide the list description.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

<details>

<summary>

items?: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/zero_trust#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_item%20%3E%20(schema)">GatewayItem</a> {created\_at, description, value } &gt;

Provide the list items.

</summary>

created\_at?: string

formatdate-time

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_item%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

description?: string

Provide the list item description (optional).

minimum0

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_item%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

value?: string

Specify the item value.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_item%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20items">Link to this property</a>

name?: string

Specify the list name.

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

type?: "SERIAL"| "URL"| "DOMAIN"| 6 more

Specify the list type.

</summary>

One of the following:

"SERIAL"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

"URL"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

"DOMAIN"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

"EMAIL"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%203">Link to this property</a>

"IP"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%204">Link to this property</a>

"CATEGORY"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%205">Link to this property</a>

"LOCATION"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%206">Link to this property</a>

"DEVICE"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%207">Link to this property</a>

"AAGUID"

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%208">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20type">Link to this property</a>

updated\_at?: string

formatdate-time

<a href="#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.gateway.lists%20%3E%20(model)%20gateway_list%20%3E%20(schema)>)

### Update Zero Trust list

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const gatewayList = await client.zeroTrust.gateway.lists.update(
  'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
  { account_id: '699d98642c564d2e855e9661899b7252', name: 'Admin Serial Numbers' },
);

console.log(gatewayList.id);
```

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": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "count": 20,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "description": "The serial numbers for administrators",
    "items": [
      {
        "created_at": "2014-01-01T05:20:00.12345Z",
        "description": "Austin office IP",
        "value": "8GE8721REF"
      }
    ],
    "name": "Admin Serial Numbers",
    "type": "SERIAL",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}
```

##### 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": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "count": 20,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "description": "The serial numbers for administrators",
    "items": [
      {
        "created_at": "2014-01-01T05:20:00.12345Z",
        "description": "Austin office IP",
        "value": "8GE8721REF"
      }
    ],
    "name": "Admin Serial Numbers",
    "type": "SERIAL",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}
```