Webflow API and Documentation Collections API

Collections are CMS collections of items.

OpenAPI Specification

webflow-api-and-documentation-webflow-collections-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Webflow Asset Folders Collections API
  description: Webflow Data API v2 - Collections 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: Collections
  description: Collections are CMS collections of items.
paths:
  /sites/{site_id}/collections:
    get:
      x-fern-sdk-group-name: collections
      x-fern-sdk-method-name: list
      security:
      - OAuth2:
        - cms:read
      operationId: list-collections
      summary: Webflow List Collections
      description: 'List of all Collections within a Site.


        Required scope | `cms:read`

        '
      tags:
      - Collections
      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
                example:
                  collections:
                  - id: 63692ab61fb2852f582ba8f5
                    displayName: Products
                    singularName: Product
                    slug: product
                    createdOn: '2019-06-12T13:35:14.238Z'
                    lastUpdated: '2022-11-17T15:08:50.480Z'
                  - id: 63692ab61fb2856e6a2ba8f6
                    displayName: Categories
                    singularName: Category
                    slug: category
                    createdOn: '2019-06-12T13:35:14.238Z'
                    lastUpdated: '2022-11-17T15:08:50.481Z'
                  - id: 63692ab61fb285a8562ba8f4
                    displayName: SKUs
                    singularName: SKU
                    slug: sku
                    createdOn: '2019-06-12T13:35:14.238Z'
                    lastUpdated: '2022-11-17T15:08:50.478Z'
                properties:
                  collections:
                    description: An array of Collections
                    type: array
                    items:
                      example:
                        id: 7f15043107e2fc95644e93807ee25dd6
                        displayName: Guide Entries
                        singularName: Guide Entry
                        fields:
                        - id: 5e2a1b3c4d5e6f7890a1b2c3
                          isEditable: true
                          isRequired: true
                          type: PlainText
                          slug: name
                          displayName: Entry Title
                          helpText: Name of the entry.
                          validations: null
                        - id: 5e2a1b3c4d5e6f7890a1b2c4
                          isEditable: true
                          isRequired: true
                          type: PlainText
                          slug: slug
                          displayName: Slug
                          helpText: Slug of the entry.
                          validations: null
                        - id: 6f7e8d9c0b1a2e3d4c5b6a7f
                          isEditable: true
                          isRequired: false
                          type: PlainText
                          slug: summary
                          displayName: Summary
                          helpText: A short summary of the entry.
                          validations: null
                        - id: 1a2b3c4d5e6f7a8b9c0d1e2f
                          isEditable: true
                          isRequired: false
                          type: RichText
                          slug: entry-html
                          displayName: Entry HTML
                          helpText: The HTML content of the entry.
                          validations: null
                        - id: 7e8d9c0b1a2e3d4c5b6a7f8e
                          isEditable: true
                          isRequired: false
                          type: Image
                          slug: illustration-image
                          displayName: Illustration Image
                          helpText: An image of the entry.
                          validations: null
                        - id: 2f3e4d5c6b7a8e9d0c1b2a3f
                          isEditable: true
                          isRequired: false
                          type: VideoLink
                          slug: demonstration-video
                          displayName: Demonstration Video
                          helpText: A video of the entry.
                          validations: null
                        - id: 8e9d0c1b2a3f4e5d6c7b8a9e
                          isEditable: true
                          isRequired: false
                          type: Link
                          slug: more-info-link
                          displayName: More Info Link
                          helpText: A link to more information about the entry.
                          validations: null
                        - id: 3f4e5d6c7b8a9e0d1c2b3a4f
                          isEditable: true
                          isRequired: false
                          type: Number
                          slug: importance-level
                          displayName: Importance Level
                          helpText: The importance level of the entry.
                          validations:
                            format: integer
                            allowNegative: false
                            allowZero: false
                            minValue: 1
                            maxValue: 5
                        - id: 9e0d1c2b3a4f5e6d7c8b9a0e
                          isEditable: true
                          isRequired: false
                          type: Switch
                          slug: is-essential
                          displayName: Is Essential
                          helpText: Is this entry essential?
                          validations: null
                        - id: 4f5e6d7c8b9a0e1d2c3b4a5f
                          isEditable: true
                          isRequired: false
                          type: Date
                          slug: first-mentioned
                          displayName: First Mentioned
                          helpText: Date of the first mention of the subject.
                          validations: null
                        - id: 0e1d2c3b4a5f6e7d8c9b0a1e
                          isEditable: true
                          isRequired: false
                          type: Color
                          slug: towel-color
                          displayName: Towel Color
                          helpText: The color of the towel.
                          validations: null
                        - id: 5f6e7d8c9b0a1e2d3c4b5a6f
                          isEditable: true
                          isRequired: false
                          type: Reference
                          slug: related-entry
                          displayName: Related Entry
                          helpText: A related entry.
                          validations:
                            collectionId: 7f15043107e2fc95644e93807ee25dd6
                        - id: 1e2d3c4b5a6f7e8d9c0b1a2f
                          isEditable: true
                          isRequired: false
                          type: MultiReference
                          slug: mentioned-in-entries
                          displayName: Mentioned In Entries
                          helpText: Entries that mention this subject.
                          validations:
                            collectionId: 7f15043107e2fc95644e93807ee25dd6
                        - id: 6f7e8d9c0b1a2e3d4c5b6a8f
                          isEditable: true
                          isRequired: false
                          type: Option
                          slug: item-type
                          displayName: Item Type
                          helpText: The type of item.
                          validations:
                            options:
                            - name: Survival Gear
                              id: 66f6e966c9e1dc700a857ca3
                            - name: Gadget
                              id: 66f6e966c9e1dc700a857ca4
                            - name: Other
                              id: 66f6e966c9e1dc700a857ca5
                        - id: 2e3d4c5b6a7f8e9d0c1b2a4f
                          isEditable: true
                          isRequired: false
                          type: File
                          slug: guide-file
                          displayName: Guide File
                          helpText: null
                          validations: null
                        - id: 7f8e9d0c1b2a3f4e5d6c8b9e
                          isEditable: true
                          isRequired: false
                          type: Email
                          slug: contributor-email
                          displayName: Contributor Email
                          helpText: null
                          validations: null
                        - id: 3a4f5e6d7c8b9a0e1d2c4b5f
                          isEditable: true
                          isRequired: false
                          type: Phone
                          slug: emergency-contact
                          displayName: Emergency Contact
                          helpText: null
                          validations: null
                        slug: guide-entry
                        createdOn: '2024-04-12T12:42:00.000Z'
                        lastUpdated: '2024-04-12T12:42:00.000Z'
                      description: A collection object
                      type: object
                      required:
                      - id
                      properties:
                        id:
                          type: string
                          format: objectid
                          description: Unique identifier for a Collection
                          example: 562ac0395358780a1f5e6fbd
                        displayName:
                          type: string
                          example: Blog Posts
                          description: Name given to the Collection
                        singularName:
                          type: string
                          example: Blog Post
                          description: The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”)
                        slug:
                          type: string
                          example: blog-posts
                          description: Slug of Collection in Site URL structure
                        createdOn:
                          type: string
                          format: date-time
                          example: '2022-12-07T16:51:37.571Z'
                          readOnly: true
                          description: The date the collection was created
                        lastUpdated:
                          type: string
                          format: date-time
                          example: '2022-12-07T16:51:37.571Z'
                          readOnly: true
                          description: The date the collection was last updated
        '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: []
    post:
      x-fern-sdk-group-name: collections
      x-fern-sdk-method-name: create
      security:
      - OAuth2:
        - cms:write
      operationId: create-collection
      summary: Webflow Create Collection
      description: 'Create a Collection for a site with collection fields.


        Each collection includes the required _name_ and _slug_ fields, which are generated automatically. You can update the `displayName` of these fields, but the slug for them cannot be changed. Fields slugs are automatically converted to lowercase. Spaces in slugs are replaced with hyphens.


        Required scope | `cms:write`

        '
      tags:
      - Collections
      parameters:
      - name: site_id
        in: path
        description: Unique identifier for a Site
        example: 580e63e98c9a982ac9b8b741
        required: true
        schema:
          type: string
          format: objectid
          default: null
      requestBody:
        description: Pass the Name of the collection, as well as the singular name of each item in the collection.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - displayName
              - singularName
              properties:
                displayName:
                  type: string
                  description: Name of the collection. Each collection name must be distinct.
                singularName:
                  type: string
                  description: Singular name of each item.
                slug:
                  type: string
                  description: Part of a URL that identifier
                fields:
                  type: array
                  description: An array of custom fields to add to the collection
                  items:
                    description: Details about the field of a collection
                    examples:
                      StaticField:
                        id: 562ac0395358780a1f5e6fbc
                        isEditable: true
                        type: RichText
                        isRequired: false
                        displayName: Post Body
                        helpText: Add the body of your post here
                      OptionField:
                        id: 562ac0395358780a1f5e6fbc
                        isEditable: true
                        type: Option
                        isRequired: false
                        displayName: Post Type
                        helpText: Add the body of your post here
                        metadata:
                          options:
                          - name: Feature
                          - name: News
                          - name: Product Highlight
                      ReferenceField:
                        id: 562ac0395358780a1f5e6fbd
                        isEditable: true
                        type: Reference
                        isRequired: false
                        displayName: Author
                        helpText: Add the post author here
                        metadata:
                          collectionId: 63692ab61fb2852f582ba8f5
                    oneOf:
                    - type: object
                      x-fern-type-name: Static Field
                      title: Static Field
                      required:
                      - type
                      - displayName
                      properties:
                        id:
                          type: string
                          format: objectid
                          description: Unique identifier for a Field
                          example: 562ac0395358780a1f5e6fbd
                          readOnly: true
                        isEditable:
                          type: boolean
                          description: Define whether the field is editable
                          readOnly: true
                          example: true
                        isRequired:
                          type: boolean
                          description: define whether a field is required in a collection
                        type:
                          type: string
                          enum:
                          - Color
                          - DateTime
                          - Email
                          - File
                          - Image
                          - Link
                          - MultiImage
                          - Number
                          - Phone
                          - PlainText
                          - RichText
                          - Switch
                          - VideoLink
                          description: Choose these appropriate field type for your collection data
                        displayName:
                          type: string
                          description: The name of a field
                        helpText:
                          type: string
                          description: Additional text to help anyone filling out this field
                      example:
                        id: 562ac0395358780a1f5e6fbc
                        isEditable: true
                        type: RichText
                        isRequired: false
                        displayName: Post Body
                        helpText: Add the body of your post here
                    - type: object
                      x-fern-type-name: Option Field
                      title: Option Field
                      required:
                      - type
                      - displayName
                      - metadata
                      properties:
                        id:
                          type: string
                          format: objectid
                          description: Unique identifier for a Field
                          readOnly: true
                        isEditable:
                          type: boolean
                          description: Define whether the field is editable
                          readOnly: true
                        isRequired:
                          type: boolean
                          description: define whether a field is required in a collection
                        type:
                          description: The [Option field type](/data/reference/field-types-item-values#option)
   

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