{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appy-to/json-schema/appy-to-app-schema.json",
  "title": "App",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appy-to-apps-api-openapi.yml#/components/schemas/App",
  "type": "object",
  "required": [
    "id",
    "name",
    "subdomain",
    "linkDomain",
    "publishableKey",
    "ios",
    "android",
    "strictAttribution",
    "appleAdsAttribution",
    "metaDecryptionKeySet",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "subdomain": {
      "type": "string"
    },
    "linkDomain": {
      "type": "string",
      "description": "Host to use in entitlements",
      "manifests and shared links.": null
    },
    "publishableKey": {
      "type": "string",
      "description": "Key for the SDK configuration. Safe to ship in the app."
    },
    "ios": {
      "oneOf": [
        {
          "$ref": "#/$defs/IOSConfig"
        },
        {
          "type": "null"
        }
      ]
    },
    "android": {
      "oneOf": [
        {
          "$ref": "#/$defs/AndroidConfig"
        },
        {
          "type": "null"
        }
      ]
    },
    "strictAttribution": {
      "type": "boolean",
      "description": "Strict attribution: only count installs Appy can verify; everything else is organic."
    },
    "appleAdsAttribution": {
      "type": "boolean",
      "description": "Look up Apple Ads attribution for new iOS installs with the token the SDK sends."
    },
    "metaDecryptionKeySet": {
      "type": "boolean",
      "description": "Whether a Meta Install Referrer decryption key is stored. The key itself is never returned."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AndroidConfig": {
      "type": "object",
      "required": [
        "packageName",
        "sha256CertFingerprints"
      ],
      "additionalProperties": false,
      "properties": {
        "packageName": {
          "type": "string"
        },
        "sha256CertFingerprints": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "description": "SHA-256 fingerprints of every certificate that signs a build users install: your upload or\ndebug key and, when you use Play App Signing, the app signing key from Play Console. With or\nwithout colons; Appy stores them as `AA:BB:...`.\n",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "IOSConfig": {
      "type": "object",
      "required": [
        "teamId",
        "bundleId"
      ],
      "additionalProperties": false,
      "properties": {
        "teamId": {
          "type": "string",
          "pattern": "^[A-Z0-9]{10}$",
          "description": "Apple Developer Team ID."
        },
        "bundleId": {
          "type": "string"
        },
        "appStoreId": {
          "type": "string",
          "pattern": "^[0-9]{5,12}$",
          "description": "Numeric App Store ID. Optional."
        },
        "providerToken": {
          "type": "string",
          "pattern": "^[0-9]{1,20}$",
          "description": "Optional App Store Connect provider token (the `pt` value of your campaign links). When it is set\ntogether with `appStoreId`, Appy adds `pt`, `ct` (the link slug, cut to Apple's 30-character limit) and `mt=8`\nto App Store destinations of this app, so App Store Connect reports impressions, product page\nviews and downloads per Appy link. Campaign parameters you put on a target yourself are kept.\n"
        }
      }
    }
  }
}