{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cogram-com/json-schema/cogram-com-project-create-v1-schema.json",
  "title": "ProjectCreateV1",
  "description": "Create project request.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api.cogram.com-v1-openapi.json#/components/schemas/ProjectCreateV1",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Name",
      "description": "Unique within the org."
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "external_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "External Id",
      "description": "Your system's ID for this project"
    },
    "owner_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Owner Id",
      "description": "Deprecated: use members instead"
    },
    "members": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ProjectMemberCreateV1"
          },
          "type": "array",
          "maxItems": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Members",
      "description": "Users to add to the project with their roles"
    },
    "client_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Name"
    },
    "project_address": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Address"
    },
    "email_filing_enabled": {
      "type": "boolean",
      "title": "Email Filing Enabled",
      "default": false
    },
    "meeting_filing_enabled": {
      "type": "boolean",
      "title": "Meeting Filing Enabled",
      "description": "Whether Cogram suggests this project for meetings and, where the organization allows it, files meetings into it. Only takes effect while the organization has meeting filing turned on. Filing a meeting here by hand works either way.",
      "default": true
    },
    "is_public": {
      "type": "boolean",
      "title": "Is Public",
      "description": "If true, project appears in org project directory; non-members can request access",
      "default": false
    },
    "template_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Id",
      "description": "Project template to apply. The project gets the template's project type and its groups with their roles. email_filing_enabled and is_public take the template's defaults unless sent. Resolved as the API key's creator, who needs read access to project templates."
    }
  },
  "type": "object",
  "required": [
    "name"
  ],
  "$defs": {
    "ProjectMemberCreateV1": {
      "properties": {
        "user_id": {
          "type": "string",
          "format": "uuid",
          "title": "User Id"
        },
        "role": {
          "$ref": "#/$defs/ProjectMemberRoleV1"
        }
      },
      "type": "object",
      "required": [
        "user_id",
        "role"
      ],
      "title": "ProjectMemberCreateV1",
      "description": "Member entry for project creation."
    },
    "ProjectMemberRoleV1": {
      "type": "string",
      "enum": [
        "MEMBER",
        "OWNER",
        "LEAD",
        "VIEWER"
      ],
      "title": "ProjectMemberRoleV1",
      "description": "Per-project role: OWNER manages membership, LEAD manages the project but not\nmembership, MEMBER read/write, VIEWER read-only."
    }
  }
}