{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cogram-com/json-schema/cogram-com-project-template-write-v1-schema.json",
  "title": "ProjectTemplateWriteV1",
  "description": "Create or replace a project template. Every field is written.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cogram-com-project-templates-api-openapi.yml#/components/schemas/ProjectTemplateWriteV1",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "description": "Unique within the org (case-insensitive)."
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "groups": {
      "items": {
        "$ref": "#/$defs/ProjectTemplateGroupInV1"
      },
      "type": "array",
      "maxItems": 500,
      "title": "Groups"
    },
    "project_type_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Type Id"
    },
    "email_filing_enabled_default": {
      "type": "boolean",
      "title": "Email Filing Enabled Default",
      "default": false
    },
    "is_public_default": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Public Default"
    }
  },
  "type": "object",
  "required": [
    "name"
  ],
  "$defs": {
    "ProjectTemplateGroupInV1": {
      "properties": {
        "group_id": {
          "type": "string",
          "maxLength": 64,
          "title": "Group Id"
        },
        "role": {
          "type": "string",
          "maxLength": 64,
          "title": "Role",
          "description": "MEMBER, VIEWER, or LEAD."
        }
      },
      "type": "object",
      "required": [
        "group_id",
        "role"
      ],
      "title": "ProjectTemplateGroupInV1",
      "description": "A group to add to every project created from the template."
    }
  }
}