Skip to navigation

Install Library

Install a shared library on the site, or update an installed library. Pass the latest version ID from List Libraries as library_id.

An update replaces the site’s library components with the new version, except the ones in componentsToDetach. To preview the changes first, use Start Library Install Changelog.

The install runs in the background. Poll Get Library Install Status until status is finished or failed.

Requires permission to manage libraries on the site.

Required scope | libraries:write

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site
library_idstringRequiredformat: "objectid"

Unique identifier for a library version (the id from List Libraries or List Installed Libraries)

Request

This endpoint expects an object.
acknowledgeNotCloneablebooleanOptional

Installing a library makes a cloneable site non-cloneable. On a first install on a cloneable site, set this to true to continue.

shouldActivateTagStylesbooleanOptional

Whether to apply the library’s tag styles to the site. On a first install, the default is true when the library has tag styles and the site has none.

componentsToDetachlist of stringsOptional
On an update, library components to keep as local copies instead of updating. Use the component ID from the component's origin, not an ObjectId.

Response headers

LocationstringOptional
URL of Get Library Install Status for this library

Response

The install is queued
statusenum
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error