Webflow Sites API

Site management endpoints for creating, updating, publishing, and deleting Webflow sites, plus managing custom domains, redirects, robots.txt, and site activity logs.

OpenAPI Specification

webflow-sites-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Webflow Sites API
  description: Webflow Data API v2 - Sites endpoints.
  version: 2.0.0
  contact:
    name: Webflow Developer Relations
    email: [email protected]
    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: Site Activity
  - name: Site Administration
  - name: Sites
    description: Sites are the sites in your Webflow workspace.
  - name: Workspce Audit Logs
paths:
  /workspaces/{workspace_id}/sites:
    post:
      x-fern-sdk-group-name: sites
      x-fern-sdk-method-name: create
      security:
        - OAuth2:
            - sites:write
      operationId: create-site
      summary: Webflow Create Site
      description: 'Create a site.


        <Warning title="Enterprise Only">This endpoint requires an Enterprise workspace.</Warning>


        Required scope | `workspace:write`

        '
      tags:
        - Sites
      parameters:
        - name: workspace_id
          in: path
          description: Unique identifier for a Workspace
          example: 580e63e98c9a982ac9b8b741
          required: true
          schema:
            type: string
            format: objectid
            default:
      requestBody:
        content:
          application/json:
            schema:
              required:
                - name
              properties:
                name:
                  type: string
                  example: The Hitchhiker's Guide to the Galaxy
                  description: The name of the site
                templateName:
                  type: string
                  example: Megadodo Publications - Guide Template
                  description: The workspace or marketplace template to use
                parentFolderId:
                  type: string
                  nullable: true
                  example: a9c420f9347c2139b248e913
                  description: MegaDodo Publications - Potential Book Ideas
      responses:
        '201':
          description: Request was successful
          content:
            application/json:
              schema:
                required:
                  - id
                  - workspaceId
                  - createdOn
                  - displayName
                  - shortName
                  - templateName
                  - lastPublished
                  - lastUpdated
                  - previewUrl
                  - timeZone
                  - dataCollectionEnabled
                  - dataCollectionType
                example:
                  id: 42e98c9a982ac9b8b742
                  workspaceId: 42e63e98c9a982ac9b8b742
                  displayName: The Hitchhiker's Guide to the Galaxy
                  shortName: hitchhikers-guide
                  previewUrl: https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png
                  timeZone: Magrathea/FactoryFloor
                  createdOn: '1979-10-12T12:00:00.000Z'
                  lastUpdated: '2023-04-02T12:42:00.000Z'
                  lastPublished: '2023-04-02T12:42:00.000Z'
                  parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6
                  customDomains:
                    - id: 589a331aa51e760df7ccb89d
                      url: hitchhikersguide.galaxy
                    - id: 589a331aa51e760df7ccb89e
                      url: heartofgold.spaceship
                  locales:
                    primary:
                      id: 653fd9af6a07fc9cfd7a5e57
                      cmsLocaleId: 653ad57de882f528b32e810e
                      enabled: false
                      displayName: English (United States)
                      displayImageId:
                      redirect: true
                      subdirectory: ''
                      tag: en-US
                    secondary:
                      - id: 653fd9af6a07fc9cfd7a5e56
                        cmsLocaleId: 653fd9af6a07fc9cfd7a5e5d
                        enabled: true
                        displayName: French (France)
                        displayImageId:
                        subdirectory: fr-fr
                        tag: fr-FR
                      - id: 654112a3a525b2739d97664c
                        cmsLocaleId: 654112a3a525b2739d97664f
                        enabled: true
                        displayName: Spanish (Mexico)
                        displayImageId:
                        subdirectory: es-mx
                        tag: es-MX
                  dataCollectionEnabled: true
                  dataCollectionType: always
                properties:
                  id:
                    type: string
                    format: objectid
                    description: Unique identifier for the Site
                    example: 580e63e98c9a982ac9b8b741
                  workspaceId:
                    type: string
                    format: objectid
                    description: Unique identifier for the Workspace
                    example: 580e63e98c9a982ac9b8b741
                  createdOn:
                    type: string
                    format: date-time
                    description: Date the Site was created
                    example: '2016-10-24T19:41:29.156Z'
                  displayName:
                    type: string
                    description: Name given to Site
                    example: api_docs_sample_json
                  shortName:
                    type: string
                    description: Slugified version of name
                    example: api-docs-sample-json
                  lastPublished:
                    type: string
                    format: date-time
                    description: Date the Site was last published
                    example: '2016-10-24T19:43:17.271Z'
                  lastUpdated:
                    type: string
                    format: date-time
                    description: Date the Site was last updated
                    example: '2016-10-24T19:43:17.271Z'
                  previewUrl:
                    type: string
                    format: uri
                    description: URL of a generated image for the given Site
                    example: https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png
                  timeZone:
                    type: string
                    description: Site timezone set under Site Settings
                    example: America/Los_Angeles
                  parentFolderId:
                    type: string
                    format: objectid
                    nullable: true
                    description: The ID of the parent folder the Site exists in
                    example: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6
                  customDomains:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                      properties:
                        id:
                          type: string
                          format: objectid
                          example: 589a331aa51e760df7ccb89d
                          description: Unique identifier for the Domain
                        url:
                          type: string
                          example: test-api-domain.com
                          description: The registered Domain name
                        lastPublished:
                          type: string
                          format: date-time
                          example: '2022-12-07T16:51:37.571Z'
                          readOnly: true
                          nullable: true
                          description: The date the custom domain was last published to
                      example:
                        id: 589a331aa51e760df7ccb89d
                        url: test-api-domain.com
                        lastPublished: '2022-12-07T16:51:37.571Z'
                  locales:
                    type: object
                    properties:
                      primary:
                        description: The primary locale for the site or application.
                        type: object
                        properties:
                          id:
                            type: string
                            description: The unique identifier for the locale.
                            example: 653fd9af6a07fc9cfd7a5e57
                          cmsLocaleId:
                            type: string
                            description: A CMS-specific identifier for the locale.
                            example: 653ad57de882f528b32e810e
                          enabled:
                            type: boolean
                            description: Indicates if the locale is enabled.
                            example: false
                          displayName:
                            type: string
                            description: The display name of the locale, typically in English.
                            example: English (United States)
                          displayImageId:
                            type: string
                            description: An optional ID for an image associated with the locale, nullable.
                            nullable: true
                            example:
                          redirect:
                            type: boolean
                            description: Determines if requests should redirect to the locale's subdirectory.
                            example: true
                          subdirectory:
                            type: string
                            description: The subdirectory path for the locale, used in URLs.
                            example: ''
                          tag:
                            type: string
                            description: A tag or code representing the locale, often following a standard format like 'en-US'.
                            example: en-US
                      secondary:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier for the locale.
                              example: 653fd9af6a07fc9cfd7a5e57
                            cmsLocaleId:
                              type: string
                              description: A CMS-specific identifier for the locale.
                              example: 653ad57de882f528b32e810e
                            enabled:
                              type: boolean
                              description: Indicates if the locale is enabled.
                              example: false
                            displayName:
                              type: string
                              description: The display name of the locale, typically in English.
                              example: English (United States)
                            displayImageId:
                              type: string
                              description: An optional ID for an image associated with the locale, nullable.
                              nullable: true
                              example:
                            redirect:
                              type: boolean
                              description: Determines if requests should redirect to the locale's subdirectory.
                              example: true
                            subdirectory:
                              type: string
                              description: The subdirectory path for the locale, used in URLs.
                              example: ''
                            tag:
                              type: string
                              description: A tag or code representing the locale, often following a standard format like 'en-US'.
                              example: en-US
                        description: A list of secondary locales available for the site or application.
                  dataCollectionEnabled:
                    type: boolean
                    description: Indicates if data collection is enabled for the site.
                    example: false
                  dataCollectionType:
                    type: string
                    enum:
                      - always
                      - optOut
                      - disabled
                    description: The type of data collection enabled for the site.
                    example: always
              examples:
                NewlyCreatedSite:
                  value:
                    id: 670ecf86817e3cc7a510eb6a
                    workspaceId: 625860a7a6c16d624927122f
                    displayName: The Hitchiker's Guide
                    shortName: hitchikers-guide
                    previewUrl:
                    timeZone:
                    createdOn: '2024-10-15T20:24:38.134Z'
                    lastUpdated: '2024-10-15T20:24:38.326Z'
                    lastPublished:
                    parentFolderId: 670ece123598db72d9648be1
                    customDomains: []
                    locales:
                    dataCollectionEnabled: true
                    dataCollectionType: always
        '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: []
        '403':
          description: Forbidden request
          content:
            application/json:
              schema:
                oneOf:
                  - description: Provided access token is valid, but is missing the required scopes.
                    x-logErrorCode: 403
                    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: missing_scopes
                          message: 'OAuthForbidden: You are missing the following scopes - components:write'
                          externalReference:
                          details: []
                  - description: Error response for non-enterprise plan workspaces.
                    x-logErrorCode: 403
                    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_enterprise_plan_workspace
                          message: This workspace is not associated with an Enterprise plan
                          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:
        

# --- truncated at 32 KB (444 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/webflow-api-and-documentation-webflow/refs/heads/main/openapi/webflow-sites-openapi.yml