{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Apply registered scripts to a page. If you have multiple scripts your App needs to apply or maintain on a page, ensure they are always included in the request body for this endpoint. To remove individual scripts, simply call this endpoint without the script in the request body.\n\n<Note title=\"Script Registration\">\n  To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) 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](/data/docs/custom-code) for more information.\n</Note>\n\n<Note>Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).</Note>\n\nRequired scope | `custom_code:write`\n","properties":{"path":{"type":"object","properties":{"page_id":{"type":"string","examples":["63c720f9347c2139b248e552"],"description":"Unique identifier for a Page"}},"required":["page_id"],"additionalProperties":false},"body":{"type":"object","properties":{"scripts":{"type":"array","description":"A list of scripts applied to a Site or a Page","items":{"type":"object","required":["id","version","location"],"properties":{"id":{"description":"ID of the registered custom code script","type":"string"},"location":{"description":"Location of the script, either in the header or footer of the published site","type":"string","default":"header","enum":["header","footer"]},"version":{"type":"string","description":"Semantic Version String for the registered script *e.g. 0.0.1*"},"attributes":{"type":"object","description":"Developer-specified key/value pairs to be applied as attributes to the script"}},"examples":[[{"id":"cms_slider"},{"location":"header"},{"version":"1.0.0"}]]}}},"examples":[{"scripts":[{"id":"cms_slider","location":"header","version":"1.0.0","attributes":{"my-attribute":"some-value"}},{"id":"alert","location":"header","version":"0.0.1"}]}]}},"required":["path"],"additionalProperties":false},"name":"Add/Update Custom Code","id":"webflow.add-custom-code-to-page","example":{"path":{"page_id":"63c720f9347c2139b248e552"}},"maxRequests":1,"summary":false}}