{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anchord-ai/json-schema/anchord-ai-link-schema.json",
  "title": "Link",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anchord-ai-links-api-openapi.yml#/components/schemas/Link",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "entity_id": {
      "type": "string",
      "format": "uuid"
    },
    "source_record_id": {
      "type": "string",
      "format": "uuid"
    },
    "confidence": {
      "type": [
        "number",
        "null"
      ]
    },
    "linked_by": {
      "$ref": "#/$defs/LinkSource"
    },
    "linked_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "unlinked_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "LinkSource": {
      "type": "string",
      "enum": [
        "resolution",
        "auto_resolve",
        "reconcile",
        "manual",
        "merge",
        "api",
        "manual_review"
      ],
      "description": "How a source record was linked to an entity (provenance). resolution = query-time resolve, auto_resolve = post-ingest exact match, reconcile = deferred fuzzy reconciliation, manual = user action, merge = entity merge/dedup, api = public link API, manual_review = review confirm.\n"
    }
  }
}