{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gen-pro/json-schema/gen-pro-watchlist-create-request-schema.json",
  "title": "WatchlistCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gen-pro-watchlists-api-openapi.yml#/components/schemas/WatchlistCreateRequest",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Display name. Idempotent: same name reuses existing watchlist."
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WatchSourceInput"
      }
    },
    "project_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "nullable": true
    },
    "conversation_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_by_run_id": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "WatchSourceInput": {
      "type": "object",
      "required": [
        "platform",
        "target_type",
        "target_value"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "description": "e.g. \"tiktok\", \"instagram\", \"youtube\""
        },
        "target_type": {
          "type": "string",
          "enum": [
            "account",
            "hashtag",
            "keyword"
          ]
        },
        "target_value": {
          "type": "string",
          "description": "@handle, hashtag name (no #), or keyword text"
        },
        "original_display_value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional original display form (e.g. \"#glassskin\" or \"@drunkelephant\")"
        }
      }
    }
  }
}