12.17.24
Data API v2
New Endpoints
Site Redirects A new set of endpoints to manage redirects for a site.
- Get Site Redirects
A new endpoint to get all redirects for a site. - Create Site Redirect
A new endpoint to create a redirect for a site. - Update Site Redirect
A new endpoint to update a redirect for a site. - Delete Site Redirect
A new endpoint to delete a redirect for a site.
Workspace Management A new set of endpoints to manage sites within a workspace.
- Create Site
A new endpoint to create a site for a workspace. - Update Site
A new endpoint to update a site for a workspace. - Delete Site
A new endpoint to delete a site for a workspace.
Data API (Beta)
Updated publishing behavior
Starting December 2024, Webflow is introducing an improved publishing workflow for collection items. When a live item’s isDraft
property is set to true
, the item will continue to remain published on the live site even after a full site publish. This allows users to make updates to the collection item in a draft state without changing what is visible on the live site.
To remove an item from the live site, you must now explicitly call the unpublish endpoint. This change gives developers more precise control over the publishing state of individual items. Please see the “publishing items” section of the CMS guide for more details.
- Create CMS Item
The default behavior of thecreateItem
API is now to create a draft item. All new items will be created with theisDraft
flag set totrue
. - Publish CMS Item
Due to changes in how publishing is handled, sites with multiple domains are longer required to have their domains in sync when publishing a single CMS Item. Previously, users would receive a409
error when attempting to publish a CMS item while the domains were not in sync. Users will no longer receive a409
error when attempting to publish a CMS item.
CMS APIs
- Update page content
Updated properties in the request body. To update a nested Component Instance within a Component, use thepropertyOverrides
property instead of using theproperties
property, . - Update component content
Updated properties in the request body. To update a nested Component Instance within a Component, use thepropertyOverrides
property instead of using theproperties
property, .
JavaScript SDK
Breaking Changes
CMS APIs
Deleting collections and collection fields
Deleting a Collection is now achieved through client.collections.delete()
, which was previously an API used to delete a Collection field. The method client.collections.deleteCollection()
has been removed.
- CHANGED: To delete a Collection, use:
client.collections.delete(collectionId)
- NEW: To delete a Collection field, use:
client.collections.deleteField(collectionId, fieldId)
- REMOVED:
client.collections.deleteCollection()
Creating CMS items
Creating multiple CMS items across multiple locales is now achieved through client.collections.createItems()
, which was previously achieved through client.collections.createItemForMultipleLocales()
.
- CHANGED:
client.collections.createItems()
- REMOVED:
client.collections.createItemForMultipleLocales()
Pages APIs
- Localization
Thelocale
query parameter is nowlocaleId
.- CHANGED:
locale
->localeId
- CHANGED:
New features
- Bulk CMS Item API support
Added methods to create multiple CMS items in a single request.- NEW:
client.collections.items.createItems()
- Create a single CMS Item or multiple CMS Items in a Collection - NEW:
client.collections.items.updateItems()
- Update multiple CMS Item(s) in a Collection - NEW:
client.collections.items.updateItemsLive()
- Update multiple live CMS Item(s) in a Collection - NEW:
client.collections.items.deleteItems()
- Unpublish/delete multiple CMS Item(s) in a Collection - NEW:
client.collections.items.deleteItemsLive()
- Unpublish/delete multiple live CMS Item(s) in a Collection
- NEW:
Fixes
- Some APIs that created resources (i.e.
collections.items.createItem()
) had request payload types that required anid
, which is not possible to provide. This is no longer required. fieldData
type in CMS Items now allows arbitrary extra key/value pairs - allowing the creation of CMS Items with custom fields.
Designer API
New methods
- Close extension
Added a new method to close the extension using the Webflow object. - Get launch context
A new method to get the launch context of the extension. This is useful for getting the launch context of the extension when it is launched from an App Intent, App Connection, or deep link. - Create percentage variable
A new method to create a percentage variable. - Create number variable
A new method to create a number variable.