Is there a way in Webflow to update 300 CMS items in a list with one API request, rather than updating each item one by one?

Published on
September 22, 2023

Yes, there is a way in Webflow to update multiple CMS items in a list with one API request. Instead of making individual API requests to update each item, you can use the Batch API feature provided by Webflow.

Batch API allows you to perform bulk operations on multiple CMS items by sending a single API request. This significantly reduces the number of calls you need to make to the API and improves performance.

To update 300 CMS items in a list with one API request using Batch API, follow these steps:

  1. Construct an array of objects, where each object represents the item you want to update. Each object should have a unique identifier (e.g., _id), and the fields you want to update.

  2. Create an update request object, which contains the collectionId and the array of items to update. For example:

{  "collectionId": "your-collection-id",  "operations": [    {      "method": "PATCH",      "path": "items/${_id}",      "data": {        "field1": "new-value1",        "field2": "new-value2"      }    },    // Add more items to update here  ]}
  1. Use the Webflow API to send a POST request to https://api.webflow.com/collections/{collectionId}/bulk with the update request object as the payload. Replace {collectionId} with your actual collection ID.

  2. Authenticate the API request by including the appropriate headers, such as the Authorization header with your Webflow API token.

  3. Upon successful completion of the API request, Webflow will update all the specified CMS items in the list with the provided data.

Using the Batch API feature in Webflow allows you to efficiently update multiple CMS items in a list with just a single API request, saving time and resources.

Additional Questions:

  • How do I authenticate API requests in Webflow?
  • Can I use Batch API to delete multiple CMS items at once in Webflow?
  • Does Webflow have any rate limits for API usage?