{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phishunt-io/json-schema/phishunt-io-archived-campaign-schema.json",
  "title": "ArchivedCampaign",
  "description": "Returned by GET /api/v1/campaigns/{id} (HTTP 200) for a key that is no longer live but whose history the correlation sidecar still retains (180-day retention). Deliberately thinner than Campaign: no evidence_summary, and members is the last recorded snapshot only (no live Site enrichment - url/status/relationship_score), since an archived cluster's indicators are not guaranteed to still be in the active feed. Shared-infrastructure grouping of public detections, not an attribution claim.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phishunt-io-openapi.yml#/components/schemas/ArchivedCampaign",
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "archived"
      ]
    },
    "data_status": {
      "type": "string",
      "enum": [
        "ok",
        "stale",
        "missing"
      ],
      "description": "Same freshness signal as CampaignsResponse.data_status."
    },
    "key": {
      "type": "string",
      "description": "Stable campaign identifier."
    },
    "label": {
      "type": "string",
      "enum": [
        "possible campaign",
        "suspected cluster"
      ],
      "description": "The two words this project ever uses for a cluster's confidence, from its last recorded state."
    },
    "confidence_score": {
      "type": "number",
      "format": "float",
      "description": "Raw campaign_confidence from the last recorded state (0-1)."
    },
    "size": {
      "type": "integer",
      "description": "Number of distinct registrable domains (Public Suffix List, private section included) in this cluster. Sibling subdomains of one domain count once; each platform tenant counts once. Archived rows built before corr-1.3.0 recorded hostnames."
    },
    "host_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of hostnames (members.length) in the last recorded state. Null for a row archived before corr-1.3.0, whose summary_json never recorded a separate hostname count."
    },
    "first_tracked": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_seen": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When this lineage was last live."
    },
    "end_state": {
      "type": "string",
      "enum": [
        "dissolved",
        "merged",
        "split",
        "unknown"
      ],
      "description": "'dissolved' - members dropped out of the active feed and nothing continues this identity. 'merged' - absorbed into another cluster; see `successors`. 'split' - this cluster's members were distributed into multiple new clusters; see `successors`. 'unknown' - no transition record was retained (e.g. a sidecar predating this classification)."
    },
    "successors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Public key(s) this lineage continues under, for end_state merged/split. A successor that is itself weak, suppressed, or unresolvable is dropped rather than shown (fail closed) - this can be an empty array even for a merged/split end_state."
    },
    "history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "type": "string",
            "enum": [
              "created",
              "grew",
              "shrank",
              "dissolved",
              "merged",
              "split",
              "unknown"
            ]
          },
          "size": {
            "type": "integer"
          },
          "joined": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "left": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "members": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Last recorded snapshot only - no live enrichment.",
        "properties": {
          "domain": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "company": {
            "type": "string"
          }
        }
      }
    },
    "url": {
      "type": "string",
      "description": "Link to the /campaigns/{key}/ page for this cluster."
    }
  }
}