{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudinary/json-schema/cloudinary-contract-create-collection-request-payload-schema.json",
  "title": "Contract.CreateCollectionRequestPayload",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudinary-collections-openapi.yml#/components/schemas/Contract.CreateCollectionRequestPayload",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the collection."
    },
    "description": {
      "type": "string",
      "description": "Optional description of the collection."
    },
    "type": {
      "type": "string",
      "default": "manual",
      "enum": [
        "manual",
        "dynamic"
      ],
      "description": "Type of the collection. `manual` holds an explicit asset list and starts empty until you add assets with the **Add assets to a collection** endpoint; `dynamic` is defined by a saved filter expression and is populated automatically.\n"
    },
    "configuration": {
      "$ref": "#/$defs/Entity.CollectionConfiguration"
    }
  },
  "$defs": {
    "Entity.CollectionConfiguration": {
      "type": "object",
      "description": "Configuration for a `dynamic` collection. Required when creating a `dynamic` collection, and not allowed for a `manual` collection.\n",
      "properties": {
        "expression": {
          "type": "string",
          "description": "The [search expression](search_expressions) that defines which assets are included in a dynamic collection. Cloudinary evaluates the expression against your product environment's assets, so the collection's contents update as assets begin or stop matching the criteria. In the Media Library, a collection whose expression was set through the API shows it as a single **Expression** filter; any filters added to the collection there are combined with it using AND.\n"
        }
      }
    }
  }
}