{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/3gppscout-com/json-schema/3gppscout-com-create-tracker-request-schema.json",
  "title": "CreateTrackerRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/3gppscout-com-openapi.json#/components/schemas/CreateTrackerRequest",
  "properties": {
    "query": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Query",
      "description": "What the user asked to follow."
    },
    "label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ],
      "title": "Label",
      "description": "User-facing name. Defaults to the query."
    },
    "targets": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TargetIn"
          },
          "type": "array",
          "maxItems": 25
        },
        {
          "type": "null"
        }
      ],
      "title": "Targets",
      "description": "The confirmed targets, usually from POST /follows/resolve after the user reviewed them."
    },
    "delivery": {
      "type": "string",
      "enum": [
        "default",
        "email",
        "dashboard"
      ],
      "title": "Delivery",
      "default": "default"
    },
    "created_via": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "chat_tool",
            "suggestion",
            "api",
            "mcp",
            "page"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Created Via"
    },
    "source_thread_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Thread Id"
    },
    "confirmed": {
      "type": "boolean",
      "title": "Confirmed",
      "description": "Set true only after the user saw the label and targets. Without it, or without targets or a phrase, the response is 409 confirmation_required with the resolution to show.",
      "default": false
    },
    "phrase": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Phrase",
      "description": "Follow this phrase by meaning, with or without targets. Defaults to the query when it names a subject (not only a spec, meeting or company). Send an empty string to follow the targets only."
    },
    "keep_broad": {
      "type": "boolean",
      "title": "Keep Broad",
      "description": "Keep a phrase Scout found too broad (409 phrase_too_broad). The follow is then page only: its updates show on the Following page and it sends no email.",
      "default": false
    }
  },
  "type": "object",
  "$defs": {
    "TargetIn": {
      "properties": {
        "target_type": {
          "type": "string",
          "enum": [
            "topic",
            "work_item",
            "spec",
            "org",
            "meeting",
            "meeting_group"
          ],
          "title": "Target Type"
        },
        "target_id": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1,
          "title": "Target Id",
          "description": "topic_id, work item code, spec number ('38.331'), org_id, meeting ID ('R1-127') or group ('R1')."
        },
        "label": {
          "type": "string",
          "maxLength": 300,
          "title": "Label",
          "default": ""
        },
        "included": {
          "type": "boolean",
          "title": "Included",
          "default": true
        },
        "resolved_by": {
          "type": "string",
          "enum": [
            "resolver",
            "user"
          ],
          "title": "Resolved By",
          "default": "resolver"
        }
      },
      "type": "object",
      "required": [
        "target_type",
        "target_id"
      ],
      "title": "TargetIn"
    }
  }
}