Changes for internal APIs affecting site data sync in the browser

To support real-time collaboration, we’re implementing version control on a set of internal APIs used to read and write site data to the designer from the browser. To ensure continued functionality of browser extensions and tools that currently use this set of APIs, please see the timeline and migration steps below.

Please note: If you’re building apps with Webflow’s official set of Public APIs, this won’t affect your work.

Affected internal endpoints

Starting August 13, 2025, the following internal site data sync endpoints will now support and enforce version control.

  • GET /sites/{siteName}/dom
  • POST /pages/{pageId}/dom
  • POST /sites/{siteName}/variables
  • PATCH /sites/{siteName}/variables/{variableId}
  • POST /sites/{siteName}/styles

Starting September 15, 2025, these endpoints will require a version number in all write requests. Requests without a version number will return an error.

These endpoints will be fully deprecated and removed in January 2026. We recommend updating your tools now to comply with version checks, while also planning your migration away from these endpoints before the deprecation date.

Timeline

1

August 13, 2025

This set of internal APIs will start returning and accepting version fields for reads and writes

2

August 19, 2025

DevRel hosted office hours for additional developer support. Sign up for office hours here.

3

September 15, 2025

This set of internal APIs will start enforcing version checks on all writes

4

January 2026

These endpoints will be fully deprecated and removed

Office hours & support

We understand that this is a change for some developers, and we’re here to help. Sign up for our office hours on August 19, 2025 to answer questions and help with the migration.

Additionally, you can reach out to our developer support team at developers@webflow.com for help.

Version management

Reading site data

The GET /sites/{siteName}/dom endpoint now returns version fields for the following resources:

ResourceFieldDescription
domNodesdomNodesVersionThe version number of the DOM nodes array
stylesstylesVersionThe version number of the styles object
variablesvariables?[].versionThe version number for each object within the variables array
variableCollectionsvariableCollections?[].versionThe version number for each object within the variableCollections array
Versioning for interactions is not yet available

Currently, version fields aren’t returned for interactions. However, this could change in the future.


Writing site data

The following endpoints require version numbers in the request body for all writes:

  • POST /pages/{pageId}/dom
  • POST /sites/{siteName}/variables
  • PATCH /sites/{siteName}/variables/{variableId}
  • POST /sites/{siteName}/styles

Errors and responses

POST and PATCH requests to the above endpoints will return errors if the version numbers are missing or don’t match.

  • 409 Conflict: Version mismatch.
    A later version of the data is available. Fetch the latest data and retry the operation.
  • 400 Bad Request: Missing version numbers in write requests.
    The request body must include a version number for each resource in the request.

Migration steps

Migrate to the Designer API before the deprecation date

Most of the functionality served by these endpoints is also available in the Designer API. We recommend migrating to the Designer API for future development for reliability and consistency. If you need additional functionality that’s not available in the Designer API, please reach out to our developer support team at developers@webflow.com to tell us what you need.

1

1. Update data retrieval

In addition to retrieving site information, be sure to store version numbers when retrieving data:

1const response = await fetch(`/sites/${siteName}/dom`);
2const data = await response.json();
3
4// Store version numbers for sync
5const versions = {
6 domNodes: data.domNodesVersion,
7 styles: data.stylesVersion,
8 variables: data.variables?.map(v => ({ id: v.id, version: v.version })),
9 variableCollections: data.variableCollections?.map(vc => ({ id: vc.id, version: vc.version }))
10};
2

2. Update data writing

Include version numbers in all write requests:

1// Example: Updating styles
2const updateResponse = await fetch(`/sites/${siteName}/styles`, {
3 method: 'POST',
4 headers: {
5 'Content-Type': 'application/json; charset=UTF-8',
6 'X-Requested-With': 'XMLHttpRequest',
7 'X-XSRF-Token': 'YOUR TOKEN HERE' // must match the current from browser cookies
8 },
9 body: JSON.stringify({
10 styles: newStyles,
11 stylesVersion: versions.styles // Include current version
12 }),
13 credentials: 'same-origin'
14});
15
16if (updateResponse.status === 409) {
17 // Version conflict - fetch latest data and retry
18 const latestData = await fetch(`/sites/${siteName}/dom`);
19 // Update your local versions and retry the operation
20}
3

3. Handle version conflicts

Implement retry logic for version conflicts:

1async function updateWithRetry(endpoint, data, maxRetries = 3) {
2 for (let attempt = 0; attempt < maxRetries; attempt++) {
3 try {
4 const response = await fetch(endpoint, {
5 method: 'POST',
6 headers: {
7 'Content-Type': 'application/json; charset=UTF-8',
8 'X-Requested-With': 'XMLHttpRequest',
9 'X-XSRF-Token': 'YOUR TOKEN HERE' // must match the current from browser cookies
10 },
11 body: JSON.stringify(data),
12 credentials: 'same-origin'
13 });
14
15 if (response.status === 409) {
16 // Fetch latest versions and retry
17 const latest = await fetch(`/sites/${siteName}/dom`);
18 const latestData = await latest.json();
19 data.stylesVersion = latestData.stylesVersion;
20 // Update other version fields as needed
21 continue;
22 }
23
24 return response;
25 } catch (error) {
26 if (attempt === maxRetries - 1) throw error;
27 }
28 }
29}

Important reminders

  • This API will be fully deprecated and removed in January 2026
  • Consider migrating to official Webflow APIs when available.
  • Test thoroughly in development environments before deploying

Support

For questions about this migration, contact our developer support team. However, we can’t provide ongoing support for private API usage.