{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comingup-today/json-schema/comingup-today-contact-create-body-schema.json",
  "title": "ContactCreateBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comingup-today-org-api-openapi.yml#/components/schemas/ContactCreateBody",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "category": {
      "type": "string",
      "maxLength": 120
    },
    "notes": {
      "type": "string",
      "maxLength": 5000
    },
    "contactPersonName": {
      "type": "string",
      "maxLength": 160
    },
    "contactPersonRole": {
      "type": "string",
      "maxLength": 160
    },
    "contactPersonEmail": {
      "type": "string",
      "maxLength": 254,
      "format": "email"
    },
    "phones": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContactPhoneBodyItem"
      },
      "maxItems": 10
    },
    "addresses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContactAddressBodyItem"
      },
      "maxItems": 10
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false,
  "$defs": {
    "ContactAddressBodyItem": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "maxLength": 60
        },
        "line1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "line2": {
          "type": "string",
          "maxLength": 200
        },
        "city": {
          "type": "string",
          "maxLength": 120
        },
        "region": {
          "type": "string",
          "maxLength": 120
        },
        "postal": {
          "type": "string",
          "maxLength": 40
        },
        "country": {
          "type": "string",
          "maxLength": 80
        },
        "isPrimary": {
          "type": "boolean"
        }
      },
      "required": [
        "line1"
      ],
      "additionalProperties": false
    },
    "ContactPhoneBodyItem": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "maxLength": 60
        },
        "phoneE164": {
          "type": "string",
          "maxLength": 32
        },
        "raw": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "isPrimary": {
          "type": "boolean"
        }
      },
      "required": [
        "raw"
      ],
      "additionalProperties": false
    }
  }
}