---
title: Lists
---

[Skip to content](#_top)

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

[Rules Lists](https://developers.cloudflare.com/api/python/resources/rules)

Copy Markdown

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

---

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

# Lists

##### [Get lists](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/methods/list)

rules.lists.list(ListListParams\*\*kwargs) -> SyncSinglePage\[[ListsList](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)>)]

GET/accounts/{account\_id}/rules/lists

##### [Get a list](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/methods/get)

rules.lists.get(strlist\_id, ListGetParams\*\*kwargs) -> [ListGetResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/rules/lists/{list\_id}

##### [Create a list](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/methods/create)

rules.lists.create(ListCreateParams\*\*kwargs) -> [ListCreateResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/rules/lists

##### [Update a list](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/methods/update)

rules.lists.update(strlist\_id, ListUpdateParams\*\*kwargs) -> [ListUpdateResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)>)

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

##### [Delete a list](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/methods/delete)

rules.lists.delete(strlist\_id, ListDeleteParams\*\*kwargs) -> [ListDeleteResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20list_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/rules/lists/{list\_id}

##### ModelsExpand Collapse

<details>

<summary>

class Hostname: …

Hostnames support ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\*), and the hyphen (-).

</summary>

url\_hostname: str

<a href="#(resource)%20rules.lists%20%3E%20(model)%20hostname%20%3E%20(schema)%20%3E%20(property)%20url_hostname">Link to this property</a>

exclude\_exact\_hostname: Optional\[bool]

Only applies to wildcard hostnames (e.g., \*.example.com). When true (default), the rule blocks only subdomains. When false, the rule blocks both the root domain and subdomains.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20hostname%20%3E%20(schema)%20%3E%20(property)%20exclude_exact_hostname">Link to this property</a>

</details>

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

<details>

<summary>

class ListsList: …

</summary>

id: str

The unique ID of the list.

maxLength32

minLength32

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

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

<details>

<summary>

kind: Literal\["ip", "redirect", "hostname", "asn"]

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

</summary>

One of the following:

"ip"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%200">Link to this property</a>

"redirect"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%201">Link to this property</a>

"hostname"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%202">Link to this property</a>

"asn"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

name: str

An informative name for the list. Use this name in filter and rule expressions.

maxLength50

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

num\_items: float

The number of items in the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20num_items">Link to this property</a>

num\_referencing\_filters: float

The number of <a href="https://developers.cloudflare.com/api/resources/filters/">filters</a> referencing the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20lists_list%20%3E%20(schema)%20%3E%20(property)%20num_referencing_filters">Link to this property</a>

description: Optional\[str]

An informative summary of the list.

maxLength500

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

</details>

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

<details>

<summary>

class Redirect: …

The definition of the redirect.

</summary>

source\_url: str

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20source_url">Link to this property</a>

target\_url: str

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20target_url">Link to this property</a>

include\_subdomains: Optional\[bool]

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20include_subdomains">Link to this property</a>

preserve\_path\_suffix: Optional\[bool]

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20preserve_path_suffix">Link to this property</a>

preserve\_query\_string: Optional\[bool]

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20preserve_query_string">Link to this property</a>

<details>

<summary>

status\_code: Optional\[Literal\[301, 302, 307, 308]]

</summary>

One of the following:

301

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20status_code%20%3E%20(member)%200">Link to this property</a>

302

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20status_code%20%3E%20(member)%201">Link to this property</a>

307

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20status_code%20%3E%20(member)%202">Link to this property</a>

308

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20status_code%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20status_code">Link to this property</a>

subpath\_matching: Optional\[bool]

<a href="#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)%20%3E%20(property)%20subpath_matching">Link to this property</a>

</details>

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

<details>

<summary>

class ListGetResponse: …

</summary>

id: str

The unique ID of the list.

maxLength32

minLength32

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

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

<details>

<summary>

kind: Literal\["ip", "redirect", "hostname", "asn"]

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

</summary>

One of the following:

"ip"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%200">Link to this property</a>

"redirect"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%201">Link to this property</a>

"hostname"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%202">Link to this property</a>

"asn"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

name: str

An informative name for the list. Use this name in filter and rule expressions.

maxLength50

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

num\_items: float

The number of items in the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20num_items">Link to this property</a>

num\_referencing\_filters: float

The number of <a href="https://developers.cloudflare.com/api/resources/filters/">filters</a> referencing the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_get_response%20%3E%20(schema)%20%3E%20(property)%20num_referencing_filters">Link to this property</a>

description: Optional\[str]

An informative summary of the list.

maxLength500

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

</details>

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

<details>

<summary>

class ListCreateResponse: …

</summary>

id: str

The unique ID of the list.

maxLength32

minLength32

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

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

<details>

<summary>

kind: Literal\["ip", "redirect", "hostname", "asn"]

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

</summary>

One of the following:

"ip"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%200">Link to this property</a>

"redirect"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%201">Link to this property</a>

"hostname"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%202">Link to this property</a>

"asn"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

name: str

An informative name for the list. Use this name in filter and rule expressions.

maxLength50

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

num\_items: float

The number of items in the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20num_items">Link to this property</a>

num\_referencing\_filters: float

The number of <a href="https://developers.cloudflare.com/api/resources/filters/">filters</a> referencing the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_create_response%20%3E%20(schema)%20%3E%20(property)%20num_referencing_filters">Link to this property</a>

description: Optional\[str]

An informative summary of the list.

maxLength500

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

</details>

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

<details>

<summary>

class ListUpdateResponse: …

</summary>

id: str

The unique ID of the list.

maxLength32

minLength32

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

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

<details>

<summary>

kind: Literal\["ip", "redirect", "hostname", "asn"]

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

</summary>

One of the following:

"ip"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%200">Link to this property</a>

"redirect"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%201">Link to this property</a>

"hostname"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%202">Link to this property</a>

"asn"

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

name: str

An informative name for the list. Use this name in filter and rule expressions.

maxLength50

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

num\_items: float

The number of items in the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20num_items">Link to this property</a>

num\_referencing\_filters: float

The number of <a href="https://developers.cloudflare.com/api/resources/filters/">filters</a> referencing the list.

<a href="#(resource)%20rules.lists%20%3E%20(model)%20list_update_response%20%3E%20(schema)%20%3E%20(property)%20num_referencing_filters">Link to this property</a>

description: Optional\[str]

An informative summary of the list.

maxLength500

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

</details>

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

<details>

<summary>

class ListDeleteResponse: …

</summary>

id: str

The unique ID of the list.

maxLength32

minLength32

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

</details>

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

#### ListsBulk Operations

##### [Get bulk operation status](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/bulk_operations/methods/get)

rules.lists.bulk\_operations.get(stroperation\_id, BulkOperationGetParams\*\*kwargs) -> [BulkOperationGetResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/rules/lists/bulk\_operations/{operation\_id}

##### ModelsExpand Collapse

<details>

<summary>

<a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)">BulkOperationGetResponse</a>

</summary>

One of the following:

<details>

<summary>

class ListsBulkOperationPendingOrRunning: …

</summary>

id: str

The unique operation ID of the asynchronous action.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

status: Literal\["pending", "running"]

The current status of the asynchronous operation.

</summary>

One of the following:

"pending"

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"running"

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ListsBulkOperationCompleted: …

</summary>

id: str

The unique operation ID of the asynchronous action.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20id">Link to this property</a>

completed: str

The RFC 3339 timestamp of when the operation was completed.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20completed">Link to this property</a>

status: Literal\["completed"]

The current status of the asynchronous operation.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class ListsBulkOperationFailed: …

</summary>

id: str

The unique operation ID of the asynchronous action.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20id">Link to this property</a>

completed: str

The RFC 3339 timestamp of when the operation was completed.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20completed">Link to this property</a>

error: str

A message describing the error when the status is <code>failed</code>.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20error">Link to this property</a>

status: Literal\["failed"]

The current status of the asynchronous operation.

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)%20%3E%20(variant)%202">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rules.lists.bulk_operations%20%3E%20(model)%20bulk_operation_get_response%20%3E%20(schema)>)

#### ListsItems

##### [Get list items](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/items/methods/list)

rules.lists.items.list(strlist\_id, ItemListParams\*\*kwargs) -> SyncCursorPaginationAfter\[[ItemListResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/rules/lists/{list\_id}/items

##### [Get a list item](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/items/methods/get)

rules.lists.items.get(stritem\_id, ItemGetParams\*\*kwargs) -> [ItemGetResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/rules/lists/{list\_id}/items/{item\_id}

##### [Create list items](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/items/methods/create)

rules.lists.items.create(strlist\_id, ItemCreateParams\*\*kwargs) -> [ItemCreateResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/rules/lists/{list\_id}/items

##### [Update all list items](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/items/methods/update)

rules.lists.items.update(strlist\_id, ItemUpdateParams\*\*kwargs) -> [ItemUpdateResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_update_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/rules/lists/{list\_id}/items

##### [Delete list items](https://developers.cloudflare.com/api/python/resources/rules/subresources/lists/subresources/items/methods/delete)

rules.lists.items.delete(strlist\_id, ItemDeleteParams\*\*kwargs) -> [ItemDeleteResponse](<https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/rules/lists/{list\_id}/items

##### ModelsExpand Collapse

<details>

<summary>

class ListCursor: …

</summary>

after: Optional\[str]

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

before: Optional\[str]

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

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20list_cursor%20%3E%20(schema)>)

<details>

<summary>

class ListItem: …

</summary>

operation\_id: str

The unique operation ID of the asynchronous action.

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

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20list_item%20%3E%20(schema)>)

<details>

<summary>

<a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)">ItemListResponse</a>

</summary>

One of the following:

<details>

<summary>

class ListsListItemIPFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20created_on">Link to this property</a>

ip: str

An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20ip">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ListsListItemHostnameFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20created_on">Link to this property</a>

hostname: <a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20hostname%20%3E%20(schema)">Hostname</a>

Hostnames support ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\*), and the hyphen (-).

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20hostname">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class ListsListItemRedirectFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20created_on">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20modified_on">Link to this property</a>

redirect: <a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)">Redirect</a>

The definition of the redirect.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20redirect">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

class ListsListItemASNFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20id">Link to this property</a>

asn: int

Defines a non-negative 32 bit integer.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20asn">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20created_on">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)%20%3E%20(variant)%203">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20item_list_response%20%3E%20(schema)>)

<details>

<summary>

<a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)">ItemGetResponse</a>

</summary>

One of the following:

<details>

<summary>

class ListsListItemIPFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20created_on">Link to this property</a>

ip: str

An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20ip">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ListsListItemHostnameFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20created_on">Link to this property</a>

hostname: <a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20hostname%20%3E%20(schema)">Hostname</a>

Hostnames support ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\*), and the hyphen (-).

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20hostname">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class ListsListItemRedirectFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20id">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20created_on">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20modified_on">Link to this property</a>

redirect: <a href="https://developers.cloudflare.com/api/python/resources/rules#(resource)%20rules.lists%20%3E%20(model)%20redirect%20%3E%20(schema)">Redirect</a>

The definition of the redirect.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20redirect">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

class ListsListItemASNFull: …

</summary>

id: str

Defines the unique ID of the item in the List.

maxLength32

minLength32

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20id">Link to this property</a>

asn: int

Defines a non-negative 32 bit integer.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20asn">Link to this property</a>

created\_on: str

The RFC 3339 timestamp of when the list was created.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20created_on">Link to this property</a>

modified\_on: str

The RFC 3339 timestamp of when the list was last modified.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20modified_on">Link to this property</a>

comment: Optional\[str]

Defines an informative summary of the list item.

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203%20%3E%20(property)%20comment">Link to this property</a>

</details>

<a href="#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)%20%3E%20(variant)%203">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20item_get_response%20%3E%20(schema)>)

<details>

<summary>

class ItemCreateResponse: …

</summary>

operation\_id: str

The unique operation ID of the asynchronous action.

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

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20item_create_response%20%3E%20(schema)>)

<details>

<summary>

class ItemUpdateResponse: …

</summary>

operation\_id: str

The unique operation ID of the asynchronous action.

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

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20item_update_response%20%3E%20(schema)>)

<details>

<summary>

class ItemDeleteResponse: …

</summary>

operation\_id: str

The unique operation ID of the asynchronous action.

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

</details>

[Link to this property](<#(resource)%20rules.lists.items%20%3E%20(model)%20item_delete_response%20%3E%20(schema)>)