{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klipy-ai/json-schema/klipy-ai-interaction-create-request-schema.json",
  "title": "InteractionCreateRequest",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klipy-ai-openapi.json#/components/schemas/InteractionCreateRequest",
  "type": "object",
  "required": [
    "type",
    "direction",
    "title"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "DIRECT_MESSAGE",
        "EMAIL",
        "MEETING",
        "MEMO",
        "BOOKING_CREATED",
        "BOOKING_CANCELLED",
        "MANUAL",
        "API_EVENT",
        "VOICE_NOTE"
      ]
    },
    "direction": {
      "type": "string",
      "enum": [
        "INBOUND",
        "OUTBOUND",
        "HYBRID",
        "INTERNAL",
        "EVENT"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 1000
    },
    "summary": {
      "type": "string",
      "maxLength": 10000
    },
    "primaryId": {
      "type": "string"
    },
    "secondaryId": {
      "type": "string"
    },
    "interactionDate": {
      "type": "number",
      "description": "Unix timestamp in milliseconds."
    },
    "mainContact": {
      "type": "string"
    },
    "mainContactEmail": {
      "type": "string",
      "format": "email"
    }
  },
  "oneOf": [
    {
      "required": [
        "mainContact"
      ]
    },
    {
      "required": [
        "mainContactEmail"
      ]
    }
  ],
  "additionalProperties": false
}