{ "opencollection": "1.0.0", "info": { "name": "Webflow Assets Asset Folders Custom Code API", "version": "2.0.0" }, "request": { "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "items": [ { "info": { "name": "Custom Code", "type": "folder" }, "items": [ { "info": { "name": "Webflow Get Custom Code", "type": "http" }, "http": { "method": "GET", "url": "https://api.webflow.com/v2/pages/:page_id/custom_code", "params": [ { "name": "page_id", "value": "63c720f9347c2139b248e552", "type": "path", "description": "Unique identifier for a Page" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Get all scripts applied to a page.\n\nRequired scope | `custom_code:read`\n" }, { "info": { "name": "Webflow Add/Update Custom Code", "type": "http" }, "http": { "method": "PUT", "url": "https://api.webflow.com/v2/pages/:page_id/custom_code", "params": [ { "name": "page_id", "value": "63c720f9347c2139b248e552", "type": "path", "description": "Unique identifier for a Page" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "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\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 registere" }, { "info": { "name": "Webflow Delete Custom Code", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.webflow.com/v2/pages/:page_id/custom_code", "params": [ { "name": "page_id", "value": "63c720f9347c2139b248e552", "type": "path", "description": "Unique identifier for a Page" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site's registered scripts.\n\nTo remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) endpoint.\n\nAccess to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).\n\nRequired scope | `custom_code:write`\n" }, { "info": { "name": "Webflow Get Custom Code", "type": "http" }, "http": { "method": "GET", "url": "https://api.webflow.com/v2/sites/:site_id/custom_code", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Get all scripts applied to a site by the App.\n\n\n To apply a script to a site or 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\n\nRequired scope | `custom_code:read`\n" }, { "info": { "name": "Webflow Add/Update Custom Code", "type": "http" }, "http": { "method": "PUT", "url": "https://api.webflow.com/v2/sites/:site_id/custom_code", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Apply registered scripts to a site. If you have multiple scripts your App needs to apply or maintain on a site, 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\n To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once r" }, { "info": { "name": "Webflow Delete Custom Code", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.webflow.com/v2/sites/:site_id/custom_code", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Remove all scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts.\n\nTo remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-sites/upsert-custom-code) endpoint.\n\nAccess to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).\n\nRequired scope | `custom_code:write`\n" }, { "info": { "name": "Webflow Get Registered Scripts", "type": "http" }, "http": { "method": "GET", "url": "https://api.webflow.com/v2/sites/:site_id/registered_scripts", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Get a list of scripts that have been registered to a site. A site can have a maximum of 800 registered scripts.\n\n\n To apply a script to a site or 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" }, { "info": { "name": "Webflow Register Script - Hosted", "type": "http" }, "http": { "method": "POST", "url": "https://api.webflow.com/v2/sites/:site_id/registered_scripts/hosted", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Register a hosted script to a site.\n\n\n To apply a script to a site or 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\n\nRequired scope | `custom_code:write`\n" }, { "info": { "name": "Webflow Register Script - Inline", "type": "http" }, "http": { "method": "POST", "url": "https://api.webflow.com/v2/sites/:site_id/registered_scripts/inline", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Register an inline script to a site. Inline scripts are limited to 2000 characters.\n\n\n To apply a script to a site or 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\n\n" }, { "info": { "name": "Webflow List Custom Code Blocks", "type": "http" }, "http": { "method": "GET", "url": "https://api.webflow.com/v2/sites/:site_id/custom_code/blocks", "params": [ { "name": "site_id", "value": "580e63e98c9a982ac9b8b741", "type": "path", "description": "Unique identifier for a Site" }, { "name": "offset", "value": "0", "type": "query", "description": "Offset used for pagination if the results have more than limit records" }, { "name": "limit", "value": "100", "type": "query", "description": "Maximum number of records to be returned (max limit: 100)" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://webflow.com/oauth/authorize", "accessTokenUrl": "https://api.webflow.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Get a list of scripts that have been applied to a site and/or individual pages.\n\n\n To apply a script to a site or 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.\n\n See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.\n\n\nR" } ] } ], "bundled": true }