Lists API endpoints
Last updated Apr 16, 2026 To invoke a Lists API operation, append the endpoint to the Cloudflare API base URL:
https://api.cloudflare.com/client/v4/
For authentication instructions, refer to the Cloudflare API's Get started page.
For help with making API calls and paginating results, refer to Make API calls.
Note
The Lists API endpoints require a value for {account_id}.
To retrieve a list of accounts to which you have access, use the List Accounts operation and note the IDs of the accounts you want to manage.
The Lists API supports the operations outlined below. Visit the associated links for examples.
Manage lists
Create a list
- Operation: Create a list
- Method and endpoint:
POST accounts/{account_id}/rules/lists - Notes: Creates an empty list.
Get lists
- Operation: Get lists
- Method and endpoint:
GET accounts/{account_id}/rules/lists - Notes:
- Fetches all lists for the account.
- This request does not fetch the items in the lists.
Get a list
- Operation: Get a list
- Method and endpoint:
GET accounts/{account_id}/rules/lists/{list_id} - Notes:
- Fetches a list by its ID.
- This request does not display the items in the list.
Update a list
- Operation: Update a list
- Method and endpoint:
PUT accounts/{account_id}/rules/lists/{list_id} - Notes:
- Updates the
descriptionof a list. - You cannot edit the
nameorkind, and you cannot update items in a list. To update an item in a list, use the Update all list items operation.
Delete a list
- Operation: Delete a list
- Method and endpoint:
DELETE accounts/{account_id}/rules/lists/{list_id} - Notes: Deletes the list, but only when no filters reference it.
Manage items in a list
Nearly all the operations for managing items in a list are asynchronous. When you add or delete a large amount of items to or from a list, there may be a delay before the bulk operation is complete.
Asynchronous list operations return an operation_id, which you can use to monitor the status of an API operation. To monitor the status of an asynchronous operation, use the Get bulk operation status endpoint and specify the ID of the operation you want to monitor.
When you make requests to a list while a bulk operation on that list is in progress, the requests are queued and processed in sequence (first in, first out). Requests for successful asynchronous operations return an HTTP 201 status code.
Get list items
- Operation: Get list items
- Method and endpoint:
GET accounts/{account_id}/rules/lists/{list_id}/items[?search={query}] - Notes:
- Fetches items in a list (all items, by default).
- Items are sorted in ascending order.
- In the case of IP lists, CIDRs are sorted by IP address, then by the subnet mask.
- To filter returned items, use the optional
searchquery string parameter. For more information, refer to the Get list items API operation.
Get a list item
- Operation: Get a list item
- Method and endpoint:
GET accounts/{account_id}/rules/lists/{list_id}/items/{item_id} - Notes: Fetches an item from a list by ID
Create list items
- Operation: Create list items
- Method and endpoint:
POST accounts/{account_id}/rules/lists/{list_id}/items - Notes:
- Appends a new item or items to a list.
- Replaces entries that already exist in the list, does not delete any items.
- Overwrites the
commentof the original item. - The response includes an
operation_id.
Update all list items
- Operation: Update all list items
- Method and endpoint:
PUT accounts/{account_id}/rules/lists/{list_id}/items - Notes:
- Deletes all current items in the list and replaces them with
items. - When
itemsis empty, deletes all items in the list. - The response includes an
operation_id.
Delete list items
- Operation: Delete list items
- Method and endpoint:
DELETE accounts/{account_id}/rules/lists/{list_id}/items - Notes:
- Deletes specified list items.
- The response includes an
operation_id.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/tools/lists/lists-api/endpoints/#page","headline":"Lists API endpoints","description":"API endpoints for managing lists and list items.","url":"https://developers.cloudflare.com/waf/tools/lists/lists-api/endpoints/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/tools/lists/lists-api/endpoints/og.png?v=a967f57d1a56fefa","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Reference information on the JSON object used in Lists API calls. title: List JSON object image: https://developers.cloudflare.com/waf/tools/lists/lists-api/json-object/og.png?v=c79bc90204212d08
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.
Docs