openapi: 3.1.0
info:
title: Webflow Custom Code API
description: Webflow Data API v2 - Custom Code endpoints.
version: 2.0.0
contact:
name: Webflow Developer Relations
email: developers@webflow.com
url: https://developers.webflow.com
termsOfService: https://webflow.com/legal/terms
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: https://api.webflow.com/v2
description: Webflow API v2
x-fern-server-name: Data API
security:
- OAuth2: []
- ApiKey: []
tags:
- name: Custom Code
description: Custom code is JavaScript that is added to your Webflow site.
- name: Custom Code - Pages
description: Custom code for pages.
- name: Custom Code - Sites
description: Custom code for sites.
- name: Registered Scripts
- name: Sites
description: Sites are the sites in your Webflow workspace.
paths:
/pages/{page_id}/custom_code:
get:
x-fern-sdk-group-name:
- pages
- scripts
x-fern-sdk-method-name: get-custom-code
security:
- OAuth2:
- custom_code:read
operationId: get-page-custom-code
summary: Webflow Get Custom Code
description: 'Get all scripts applied to a page.
Required scope | `custom_code:read`
'
tags:
- Custom Code
- Custom Code - Pages
- Sites
parameters:
- name: page_id
in: path
description: Unique identifier for a Page
example: 63c720f9347c2139b248e552
required: true
schema:
type: string
format: objectid
default:
responses:
'200':
description: Request was successful
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
example:
value:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
attributes: {}
lastUpdated: '2022-10-26T00:28:54.191Z'
createdOn: '2022-10-26T00:28:54.191Z'
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
delete:
x-fern-sdk-group-name:
- pages
- scripts
x-fern-sdk-method-name: delete-custom-code
security:
- OAuth2:
- custom_code:write
operationId: delete-page-custom-code
summary: Webflow Delete Custom Code
description: 'Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site''s registered scripts.
To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) endpoint.
Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).
Required scope | `custom_code:write`
'
tags:
- Custom Code
- Custom Code - Pages
- Sites
parameters:
- name: page_id
in: path
description: Unique identifier for a Page
example: 63c720f9347c2139b248e552
required: true
schema:
type: string
format: objectid
default:
responses:
'204':
description: Request was successful. No Content is returned.
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
put:
x-fern-sdk-group-name:
- pages
- scripts
x-fern-sdk-method-name: upsert-custom-code
security:
- OAuth2:
- custom_code:write
operationId: add-custom-code-to-page
summary: Webflow Add/Update Custom Code
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\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\n\nRequired scope | `custom_code:write`\n"
tags:
- Custom Code
- Custom Code - Pages
- Sites
parameters:
- name: page_id
in: path
description: Unique identifier for a Page
example: 63c720f9347c2139b248e552
required: true
schema:
type: string
format: objectid
default:
requestBody:
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
responses:
'200':
description: Request was successful
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
attributes: {}
lastUpdated: '2022-10-26T00:28:54.191Z'
createdOn: '2022-10-26T00:28:54.191Z'
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'409':
description: The maximum number of registered scripts has been reached.
x-logErrorCode: 409
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: custom_code_max_registered_scripts
message: The maximum number of registered scripts has been reached.
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
/sites/{site_id}/custom_code:
get:
x-fern-sdk-group-name:
- sites
- scripts
x-fern-sdk-method-name: get-custom-code
security:
- OAuth2:
- custom_code:read
operationId: get-site-custom-code
summary: Webflow Get Custom Code
description: "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"
tags:
- Custom Code
- Custom Code - Sites
- Sites
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
responses:
'200':
description: Request was successful
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
attributes: {}
lastUpdated: '2022-10-26T00:28:54.191Z'
createdOn: '2022-10-26T00:28:54.191Z'
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
delete:
x-fern-sdk-group-name:
- sites
- scripts
x-fern-sdk-method-name: delete-custom-code
security:
- OAuth2:
- custom_code:write
operationId: delete-site-custom-code
summary: Webflow Delete Custom Code
description: 'Remove all scripts from a site applied by the App. This endpoint will not remove scripts from the site''s registered scripts.
To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-sites/upsert-custom-code) endpoint.
Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).
Required scope | `custom_code:write`
'
tags:
- Custom Code
- Custom Code - Sites
- Sites
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
responses:
'204':
description: Request was successful. No Content is returned.
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
put:
x-fern-sdk-group-name:
- sites
- scripts
x-fern-sdk-method-name: upsert-custom-code
security:
- OAuth2:
- custom_code:write
operationId: add-custom-code-tosite
summary: Webflow Add/Update Custom Code
description: "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 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"
tags:
- Custom Code
- Custom Code - Sites
- Sites
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
requestBody:
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
responses:
'200':
description: Request was successful
content:
application/json:
schema:
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
lastUpdated:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were last updated
createdOn:
type: string
format: date-string
readOnly: true
description: Date when the Site's scripts were created
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
example:
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
/sites/{site_id}/registered_scripts:
get:
x-fern-sdk-group-name: scripts
x-fern-sdk-method-name: list
security:
- OAuth2:
- custom_code:read
operationId: get-scripts
summary: Webflow Get Registered Scripts
description: "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 more information.\n\n\nRequired scope | `custom_code:read`\n"
tags:
- Custom Code
- Registered Scripts
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
responses:
'200':
description: Request was successful
content:
application/json:
schema:
type: object
description: A list of scripts registered to the site
properties:
registeredScripts:
type: array
items:
description: Registered custom code for application
properties:
id:
type: string
readOnly: true
description: Human readable id, derived from the user-specified display name
canCopy:
type: boolean
description: Define whether the script can be copied on site duplication and transfer
default: false
displayName:
type: string
description: User-facing name for the script. Must be between 1 and 50 alphanumeric characters
hostedLocation:
type: string
description: URI for an externally hosted script location
integrityHash:
type: string
description: Sub-Resource Integrity Hash. Only required for externally hosted scripts (passed via hostedLocation)
format: hash
createdOn:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was created
lastUpdated:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was last updated
version:
type: string
description: A Semantic Version (SemVer) string, denoting the version of the script
example:
id: cms_slider
displayName: CMS Slider
hostedLocation: https://cdn.jsdelivr.net/.../cmsslider.js
integrityHash: sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+
canCopy: true
version: 1.0.0
createdOn: '2022-10-26T00:28:54.191Z'
pagination:
description: Pagination object
type: object
required:
- limit
- offset
- total
properties:
limit:
type: integer
description: The limit used for pagination
example: 100
readOnly: true
offset:
type: integer
description: The offset used for pagination
example: 0
readOnly: true
total:
type: integer
description: The total number of records
example: 100
readOnly: true
example:
registeredScripts:
- id: alert
version: 0.0.1
displayName: Alert
hostedLocation: https://cdn.webflow.io/.../alert-0.0.1.js
integrityHash:
createdOn: '2022-10-26T00:28:54.191Z'
canCopy: false
- id: alert
version: 0.0.2
displayName: Alert
hostedLocation: https://cdn.webflow.io/.../alert-0.0.2.js
integrityHash:
createdOn: '2022-10-26T00:28:54.191Z'
canCopy: false
- id: cms_slider
version: 1.0.0
displayName: CMS Slider
hostedLocation: https://cdn.jsdelivr.net/.../cms_slider.js
integrityHash: sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+
createdOn: '2022-10-26T00:28:54.191Z'
canCopy: true
pagination:
limit: 100
offset: 0
total: 3
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
/sites/{site_id}/registered_scripts/hosted:
post:
x-fern-sdk-group-name: scripts
x-fern-sdk-method-name: register-hosted
security:
- OAuth2:
- custom_code:write
operationId: post-hosted-script
summary: Webflow Register Script - Hosted
description: "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"
tags:
- Custom Code
- Registered Scripts
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
requestBody:
content:
application/json:
schema:
description: A registered external script
required:
- displayName
- version
- hostedLocation
- integrityHash
properties:
hostedLocation:
type: string
description: URI for an externally hosted script location
integrityHash:
type: string
description: Sub-Resource Integrity Hash
format: hash
canCopy:
type: boolean
description: Define whether the script can be copied on site duplication and transfer
default: false
version:
type: string
description: A Semantic Version (SemVer) string, denoting the version of the script
displayName:
type: string
description: User-facing name for the script. Must be between 1 and 50 alphanumeric characters
examples:
- displayName: CMS Slider
hostedLocation: https://cdn.jsdelivr.net/.../cmsslider.js
integrityHash: sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+
canCopy: true
version: 1.0.0
responses:
'201':
description: Request was successful
content:
application/json:
schema:
description: Registered custom code for application
properties:
id:
type: string
readOnly: true
description: Human readable id, derived from the user-specified display name
canCopy:
type: boolean
description: Define whether the script can be copied on site duplication and transfer
default: false
displayName:
type: string
description: User-facing name for the script. Must be between 1 and 50 alphanumeric characters
hostedLocation:
type: string
description: URI for an externally hosted script location
integrityHash:
type: string
description: Sub-Resource Integrity Hash. Only required for externally hosted scripts (passed via hostedLocation)
format: hash
createdOn:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was created
lastUpdated:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was last updated
version:
type: string
description: A Semantic Version (SemVer) string, denoting the version of the script
example:
id: cms_slider
displayName: CMS Slider
hostedLocation: https://cdn.jsdelivr.net/.../cmsslider.js
integrityHash: sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+
canCopy: true
version: 1.0.0
createdOn: '2022-10-26T00:28:54.191Z'
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
/sites/{site_id}/registered_scripts/inline:
post:
x-fern-sdk-group-name: scripts
x-fern-sdk-method-name: register-inline
security:
- OAuth2:
- custom_code:write
operationId: post-inline-scripts
summary: Webflow Register Script - Inline
description: "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\nRequired scope | `custom_code:write`\n"
tags:
- Custom Code
- Registered Scripts
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
requestBody:
content:
application/json:
schema:
description: A registered inline (Webflow-hosted) script
required:
- displayName
- version
- sourceCode
properties:
sourceCode:
type: string
description: The code to be added to the site (to be hosted by Webflow).
example: alert('hello world');
integrityHash:
type: string
description: Sub-Resource Integrity Hash. Only required for externally hosted scripts (passed via hostedLocation)
format: hash
canCopy:
type: boolean
description: Define whether the script can be copied on site duplication and transfer
default: false
version:
type: string
description: A Semantic Version (SemVer) string, denoting the version of the script
displayName:
type: string
description: User-facing name for the script. Must be between 1 and 50 alphanumeric characters
example:
displayName: Alert
sourceCode: alert('hello world');
integrityHash:
version: 0.0.1
responses:
'201':
description: Created
content:
application/json:
schema:
description: Registered custom code for application
properties:
id:
type: string
readOnly: true
description: Human readable id, derived from the user-specified display name
canCopy:
type: boolean
description: Define whether the script can be copied on site duplication and transfer
default: false
displayName:
type: string
description: User-facing name for the script. Must be between 1 and 50 alphanumeric characters
hostedLocation:
type: string
description: URI for an externally hosted script location
integrityHash:
type: string
description: Sub-Resource Integrity Hash. Only required for externally hosted scripts (passed via hostedLocation)
format: hash
createdOn:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was created
lastUpdated:
type: string
format: date-string
readOnly: true
description: Timestamp when the script version was last updated
version:
type: string
description: A Semantic Version (SemVer) string, denoting the version of the script
example:
id: alert
displayName: Alert
hostedLocation: https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js
integrityHash:
canCopy: false
version: 0.0.1
createdOn: '2022-10-26T00:28:54.191Z'
examples:
CustomCodeInlineResponse:
value:
id: alert
displayName: Alert
hostedLocation: https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js
integrityHash:
canCopy: false
version: 0.0.1
createdOn: '2022-10-26T00:28:54.191Z'
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
/sites/{site_id}/custom_code/blocks:
get:
x-fern-sdk-group-name:
- sites
- scripts
x-fern-sdk-method-name: list-custom-code-blocks
security:
- OAuth2:
- custom_code:read
operationId: get-site-custom-code-blocks
summary: Webflow List Custom Code Blocks
description: "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\nRequired scope | `custom_code:read`\n"
tags:
- Custom Code
parameters:
- name: site_id
in: path
description: Unique identifier for a Site
example: 580e63e98c9a982ac9b8b741
required: true
schema:
type: string
format: objectid
default:
- in: query
example: 0
allowEmptyValue: true
name: offset
description: Offset used for pagination if the results have more than limit records
required: false
schema:
type: integer
- in: query
allowEmptyValue: true
name: limit
example: 100
description: 'Maximum number of records to be returned (max limit: 100)'
required: false
schema:
type: integer
responses:
'200':
description: Request was successful
content:
application/json:
schema:
description: Custom Code Blocks corresponding to where scripts were applied
properties:
blocks:
type: array
items:
description: A specific instance of Custom Code applied to a Site or Page
properties:
siteId:
type: string
description: The Site ID where the custom code was applied
pageId:
type: string
nullable: true
description: The Page ID (if applied at Page-level)
type:
type: string
nullable: true
enum:
- page
- site
description: Whether the Custom Code script is applied at the Site-level or Page-level
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
format: objectId
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
example:
- id: cms_slider
- location: header
- version: 1.0.0
createdOn:
type: string
format: date-time
readOnly: true
description: The date the Block was created
example: '2016-10-24T19:42:38.929Z'
lastUpdated:
type: string
format: date-time
readOnly: true
description: The date the Block was most recently updated
example: '2016-10-24T19:42:38.929Z'
pagination:
description: Pagination object
type: object
required:
- limit
- offset
- total
properties:
limit:
type: integer
description: The limit used for pagination
example: 100
readOnly: true
offset:
type: integer
description: The offset used for pagination
example: 0
readOnly: true
total:
type: integer
description: The total number of records
example: 100
readOnly: true
example:
blocks:
- siteId: 6258612d1ee792848f805dcf
pageId:
type: site
scripts:
- id: chartjs
displayName: ChartJS
version: 4.4.2
location: header
attributes: {}
lastUpdated: '2024-04-03T16:49:15.461Z'
createdOn: '2024-04-03T16:49:15.461Z'
- siteId: 6390c49674a71f84b51a08d8
pageId: 6419db964a9c43f6a3af6348
type: page
scripts:
- id: cms_slider
location: header
version: 1.0.0
attributes:
my-attribute: some-value
- id: alert
location: header
version: 0.0.1
attributes: {}
lastUpdated: '2022-10-26T00:28:54.191Z'
createdOn: '2022-10-26T00:28:54.191Z'
pagination:
total: 1
offset: 0
limit: 10
'400':
description: Request body was incorrectly formatted.
x-logErrorCode: 400
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: bad_request
message: 'Bad Request: Request is malformed'
externalReference:
details: []
'401':
description: Provided access token is invalid or does not have access to requested resource
x-logErrorCode: 401
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
'404':
description: Requested resource not found
x-logErrorCode: 404
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: resource_not_found
message: 'Requested resource not found: The site cannot be found'
externalReference:
details: []
'429':
description: The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
x-logErrorCode: 429
headers:
X-RateLimit-Remaining:
description: Contains the number of available requests remaining in the current minute
schema:
type: number
X-RateLimit-Limit:
description: Contains your current overall rate limit per minute
schema:
type: number
content:
application/json:
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: too_many_requests
message: Too many requests
externalReference:
details: []
'500':
description: We had a problem with our server. Try again later.
content:
application/json:
x-logErrorCode: 500
schema:
type: object
example:
code: not_authorized
message: Request not authorized
externalReference:
details: []
properties:
code:
type: string
description: Error code
example: not_authorized
enum:
- bad_request
- collection_not_found
- conflict
- duplicate_collection
- duplicate_user_email
- ecommerce_not_enabled
- forbidden
- forms_require_republish
- incompatible_webhook_filter
- internal_error
- invalid_auth_version
- invalid_credentials
- invalid_domain
- invalid_user_email
- item_not_found
- missing_scopes
- no_domains
- not_authorized
- not_enterprise_plan_site
- not_enterprise_plan_workspace
- order_not_found
- resource_not_found
- too_many_requests
- unsupported_version
- unsupported_webhook_trigger_type
- user_limit_reached
- user_not_found
- users_not_enabled
- validation_error
message:
type: string
description: Error message
example: Request not authorized
externalReference:
type: string
description: Link to more information
example: ''
details:
type: array
description: Array of errors
items:
- type: string
example: Invalid email address
description: Error message
- type: object
example:
field: email
message: Invalid email address
description: Error message
example: []
example:
code: internal_error
message: An Internal Error occurred
externalReference:
details: []
components:
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
scopes:
authorized_user:read: read details about the authorized user
assets:read: read assets on the site
assets:write: write assets on a site
cms:read: read collections and items for a site
cms:write: write to collections and items for a site
comments:read: read comments on the site
comments:write: write comments on the site
custom_code:read: read custom code on the site
custom_code:write: modify custom code on the site
ecommerce:read: read ecommerce data
ecommerce:write: edit ecommerce data
forms:read: read form data
forms:write: write form data
pages:read: read pages on the site
pages:write: write to pages on the site
components:read: read component data
components:write: write component data
sites:read: read sites on the site
sites:write: modify pages on the site
users:read: read users on the site
site_activity:read: read site activity logs
users:write: modify users on the site
workspace:read: read workspace resource data
workspace:write: write workspace resource data
site_config:read: read site configuration data
site_config:write: write site configuration data
authorizationUrl: https://webflow.com/oauth/authorize
tokenUrl: https://api.webflow.com/oauth/token
ApiKey:
type: http
scheme: bearer
x-fern-token-variable-name: access_token