Skip to navigation

Libraries

The Libraries API manages shared libraries in a Webflow workspace. A site shares its components, variables, and assets as a library, and other sites in the workspace install it. Use the API to share and install libraries, preview changes, push updates, and copy library components into a site.

All endpoints live under https://api.webflow.com/v2/sites/{site_id} and use the libraries:read and libraries:write scopes. See Scopes for the full list.

IDs

IDWhat it identifiesWhere to find it
id (library_id)One version of a libraryList Libraries returns the latest version. List Installed Libraries returns the installed version.
profileIdA library across all its versionsBoth lists. Match a library between them by profileId.
library:<libraryId>:<resourceId>A component or asset inside an installed libraryComponent discovery in the data_component_tool of the Webflow MCP server lists library components with these IDs.

Install Library takes the latest version ID. If an installed library has a different id than the same profileId in List Libraries, an update is available. Uninstall Library takes the installed version ID.

Background actions

Share, install, uninstall, import, and push run in the background. The two changelog previews also run in the background. A successful request returns 202 Accepted with a Location header that points to the action’s status endpoint:

{
"status": "pending"
}

Poll the status endpoint, and wait between calls, until status is finished or failed. A failed status includes error.message:

{
"status": "failed",
"error": {
"message": "Library install failed. Try again."
}
}

Each status endpoint returns the site’s latest run of the action. It returns 404 when there is no run. Statuses and changelogs expire after 24 hours.

One action at a time

A site runs one share, install, uninstall, or import at a time. This includes actions that start in the Webflow Designer. While one runs, a new action returns 409 with code library_task_in_progress:

{
"code": "library_task_in_progress",
"message": "A library operation is already in progress: Install task already running",
"externalReference": null,
"details": []
}

Poll the running action’s status until it finishes, then retry. A push also returns this error when a share runs on the source site, or an install, uninstall, or import runs on a target site.

Install or update a library

  1. Call List Libraries and take the id of the library.
  2. Optional: preview the changes. Call Start Library Install Changelog, then poll Get Library Install Changelog Status. The result lists the changes and tells you if the install needs acknowledgeNotCloneable.
  3. Call Install Library, then poll Get Library Install Status.

An install always takes the latest version. An older version ID returns 409. On an installed library, Install Library updates it and replaces the site’s library components. To keep some components as local copies, list them in componentsToDetach.

Installing a library makes a cloneable site non-cloneable. On a cloneable site, the first install returns 400 until you set acknowledgeNotCloneable to true.

Share a library

  1. Optional: preview the changes. Call Start Library Share Changelog, then poll Get Library Share Changelog Status. The result lists the changes since the latest version, and the invalid items that a share leaves out.
  2. Call Share Library, then poll Get Library Share Status.

Each share publishes a new version, even when nothing changed. A site with nothing to share returns 400. A library can share up to 2000 assets. To share fewer, leave asset folders out with excludedAssetFolderIds.

To unshare a library, call Update Library Settings with shared: false. Sites that installed it keep it. To share it again without a new version, use shared: true.

To update the sites that installed the library, call Push Library Updates. By default, the push updates every outdated site. List Library Installations shows the outdated sites.

Uninstall, unshare, and push change other people’s work. An uninstall removes the library from the site. A push replaces the library’s components on each target site. Confirm with the site owners first.

Use library components and assets

Library components and assets have IDs in the format library:<libraryId>:<resourceId>. To use one on a page, copy it into the site first:

  1. Call Import Library Resources with up to 100 IDs in components and assets.
  2. Poll Get Library Import Status until status is finished.
  3. Use localComponentId or localAssetId from result, which is the ID of the site’s copy.

If the site already has a copy, the import returns it. The import is all-or-nothing: when one ID fails, the import adds nothing.

Permissions

Webflow checks the permissions of the user who authorized the token. A missing permission returns 403 with code insufficient_permissions.

PermissionEndpoints
Add library components or manage libraries on the siteList Libraries, List Installed Libraries, List Library Installations, Get Library Import Status
Add library components on the siteImport Library Resources. To import only assets, managing libraries on the site is also enough.
Manage libraries on the siteGet Site Library, Install Library, Uninstall Library, both changelogs, and their status endpoints. Get Library Share Status, and Update Library Settings with shared.
Share and manage libraries on the siteShare Library
Manage libraries in the workspaceUpdate Library Settings with autoInstall
Manage libraries in the workspace, or manage libraries on the sitePush Library Updates and Get Library Push Status

Plan entitlements

Some actions depend on the workspace plan:

FeatureEndpointError
Shared library limitShare Library on a library that isn’t shared, Update Library Settings (shared: true)402 library_limit_reached
Automatic installsUpdate Library Settings (autoInstall)403 library_forbidden
Library push updatesPush Library Updates403 library_forbidden
Code componentsInstall Library for a code library403 library_forbidden

Limits

  • Install, uninstall, import, share, push, and Update Library Settings share a limit of 10 requests per minute per site.
  • Each changelog preview has its own limit of 10 requests per minute per site.
  • A request over a limit returns 429.
  • Write requests on an archived site return 409 with code conflict.