Add/Update Custom Code

Apply scripts to a page.

Script Registration

To apply a script to a page, the script must first be registered to a Site via the Register Script endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on working with Custom Code for more information.

Required scope | custom_code:write

Path parameters

page_idstringRequiredformat: "objectid"

Unique identifier for a Page

Headers

AuthorizationstringRequired

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

Request

This endpoint expects an object.
scriptslist of objectsOptional

A list of scripts applied to a Site or a Page

lastUpdatedstringOptionalformat: "date-string"

Date when the Site’s scripts were last updated

createdOnstringOptionalformat: "date-string"

Date when the Site’s scripts were created

Response

Request was successful

scriptslist of objectsOptional

A list of scripts applied to a Site or a Page

lastUpdatedstringOptionalformat: "date-string"

Date when the Site’s scripts were last updated

createdOnstringOptionalformat: "date-string"

Date when the Site’s scripts were created

Errors