create_content_type
Define and create custom content types with structured schemas, field rules, and taxonomies to organize and manage content efficiently.
Instructions
Creates a new content type with the specified schema, options, field rules, and taxonomies.
Input Schema
| Name | Required | Description | Default | 
|---|---|---|---|
| field_rules | No | Field visibility rules for showing/hiding fields based on conditions | |
| options | No | Content type options like webpage/content block settings and URL patterns | |
| schema | Yes | Array of schema fields defining the content structure. Each field object should include properties like: - display_name: Field display name - uid: Unique identifier for the field - data_type: Type of data (text, number, boolean, file, etc.) - field_metadata: Additional metadata for the field - multiple: Whether field accepts multiple values - mandatory: Whether field is required - unique: Whether field values must be unique | |
| taxonomies | No | Taxonomies to associate with this content type | |
| title | Yes | Content type title | |
| uid | Yes | Content type UID (unique identifier) | 
Input Schema (JSON Schema)
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "properties": {
    "field_rules": {
      "description": "Field visibility rules for showing/hiding fields based on conditions",
      "items": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "action": {
                  "description": "Action to perform (show/hide)",
                  "type": "string"
                },
                "target_field": {
                  "description": "Field to show/hide based on condition",
                  "type": "string"
                }
              },
              "required": [
                "action",
                "target_field"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "conditions": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "operand_field": {
                  "description": "Field on which to apply condition",
                  "type": "string"
                },
                "operator": {
                  "description": "Operator for condition (e.g., equals, contains)",
                  "type": "string"
                },
                "value": {
                  "description": "Expected value for the condition"
                }
              },
              "required": [
                "operand_field",
                "operator"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "match_type": {
            "description": "Whether all or any conditions should be met",
            "type": "string"
          }
        },
        "required": [
          "conditions",
          "actions",
          "match_type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "options": {
      "additionalProperties": false,
      "description": "Content type options like webpage/content block settings and URL patterns",
      "properties": {
        "is_page": {
          "description": "Set to true for webpage content types, false for content blocks",
          "type": "boolean"
        },
        "singleton": {
          "description": "Set to true for single content types, false for multiple",
          "type": "boolean"
        },
        "sub_title": {
          "description": "Fields to use as subtitles",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "title": {
          "description": "Field to use as the title",
          "type": "string"
        },
        "url_pattern": {
          "description": "Default URL pattern for entries",
          "type": "string"
        },
        "url_prefix": {
          "description": "Path prefix for entries",
          "type": "string"
        }
      },
      "type": "object"
    },
    "schema": {
      "description": "Array of schema fields defining the content structure. Each field object should include properties like:\n- display_name: Field display name\n- uid: Unique identifier for the field\n- data_type: Type of data (text, number, boolean, file, etc.)\n- field_metadata: Additional metadata for the field\n- multiple: Whether field accepts multiple values\n- mandatory: Whether field is required\n- unique: Whether field values must be unique",
      "items": {
        "additionalProperties": true,
        "properties": {},
        "type": "object"
      },
      "type": "array"
    },
    "taxonomies": {
      "description": "Taxonomies to associate with this content type",
      "items": {
        "additionalProperties": false,
        "properties": {
          "mandatory": {
            "description": "Whether this taxonomy is required",
            "type": "boolean"
          },
          "max_terms": {
            "description": "Maximum number of terms allowed (up to 25)",
            "type": "number"
          },
          "non_localizable": {
            "description": "Whether this taxonomy is non-localizable",
            "type": "boolean"
          },
          "taxonomy_uid": {
            "description": "Taxonomy UID to link",
            "type": "string"
          }
        },
        "required": [
          "taxonomy_uid"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "title": {
      "description": "Content type title",
      "type": "string"
    },
    "uid": {
      "description": "Content type UID (unique identifier)",
      "type": "string"
    }
  },
  "required": [
    "title",
    "uid",
    "schema"
  ],
  "type": "object"
}