{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/warplink-app/json-schema/warplink-app-install-schema.json",
  "title": "Install",
  "description": "One install record. Only matched installs have one.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/warplink-app-openapi.json#/components/schemas/Install",
  "type": "object",
  "required": [
    "id",
    "platform",
    "installed_at",
    "match_guaranteed",
    "has_device_id",
    "has_device_fingerprint",
    "has_matched_payload"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Stable install id. The same value the attribution response returned as install_id."
    },
    "app_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The app the install belongs to, or null when it was never determined."
    },
    "link_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The link the install is attributed to. Null after that link is deleted."
    },
    "click_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The click the install was attributed to. Null when the match did not carry a click identifier, for example an Android referrer match or an older deferred payload."
    },
    "platform": {
      "type": "string",
      "enum": [
        "ios",
        "android"
      ]
    },
    "installed_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the attribution request created the record."
    },
    "attributed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the match was recorded. Null on records created before this was stored."
    },
    "match_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "deterministic",
        "probabilistic",
        null
      ],
      "description": "How the install was matched."
    },
    "match_confidence": {
      "type": [
        "number",
        "null"
      ],
      "description": "From 0 to 1. Null on records created before this was stored."
    },
    "match_guaranteed": {
      "type": "boolean",
      "description": "True when match_type is deterministic. Branch on this, not on a confidence threshold."
    },
    "is_reinstall": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the device had completed attribution before. Null when the SDK did not say."
    },
    "match_method": {
      "type": "string",
      "enum": [
        "install_token",
        "referrer",
        "android_referrer",
        "device_id",
        "link_open",
        "probabilistic"
      ],
      "description": "The stored way the install was matched. `install_token` is a recovery token that reached an iOS app, or one from the team's own page. `android_referrer` is a recovery token that reached an Android app through the Play install referrer, and its evidence_class is exact. `referrer` is a link ID alone from the Play install referrer, and its evidence_class is legacy_link. `device_id` is a device that already had an install, `link_open` an open of the link in an app that was already installed, and `probabilistic` an estimate from device signals. Never null: an install that stored no method reports referrer for a deterministic match and probabilistic for any other. The attribution response returns the same value for the same install."
    },
    "evidence_class": {
      "type": "string",
      "enum": [
        "exact",
        "estimated",
        "legacy_link"
      ],
      "description": "How firm the match is. Never null: an install that stored no class reports legacy_link for a deterministic match and estimated for any other, never exact."
    },
    "replay_state": {
      "type": "string",
      "enum": [
        "original"
      ],
      "description": "Always original: a record is the first answer to an installation, and a repeat of it is an attempt, not a record."
    },
    "referral_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The id of the referral this install was credited as (ref_ and 32 hex characters). Null when no referral was credited. The installer id is never returned."
    },
    "has_device_id": {
      "type": "boolean",
      "description": "Whether a device id is stored. The value is never returned."
    },
    "has_device_fingerprint": {
      "type": "boolean",
      "description": "Whether a one-way hash of device signals is stored. The value is never returned."
    },
    "has_matched_payload": {
      "type": "boolean",
      "description": "Whether the routing the match answered with (destination, deep link, custom parameters) was stored at match time. False on records created before that was stored. The payload is never returned."
    }
  }
}