Webflow Registered Scripts API

The Registered Scripts API from Webflow — 3 operation(s) for registered scripts.

OpenAPI Specification

webflow-registered-scripts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Webflow Assets Asset Folders Registered Scripts API
  description: Webflow Data API v2 - Assets 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: Registered Scripts
paths:
  /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<Note title=\"Script Registration\">\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</Note>\n\nRequired scope | `custom_code:read`\n"
      tags:
      - Registered Scripts
      parameters:
      - name: site_id
        in: path
        description: Unique identifier for a Site
        example: 580e63e98c9a982ac9b8b741
        required: true
        schema:
          type: string
          format: objectid
          default: null
      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: null
                    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: null
                    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: null
                  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: null
                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: null
                  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: null
                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: null
                  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: null
                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: null
                  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: null
                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: null
                  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: null
                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<Note title=\"Script Registration\">\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</Note>\n\nRequired scope | `custom_code:write`\n"
      tags:
      - Registered Scripts
      parameters:
      - name: site_id
        in: path
        description: Unique identifier for a Site
        example: 580e63e98c9a982ac9b8b741
        required: true
        schema:
          type: string
          format: objectid
          default: null
      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: null
                  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: null
                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: null
                  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: null
                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: null
                  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_n

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/webflow/refs/heads/main/openapi/webflow-registered-scripts-api-openapi.yml