{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appy-to/json-schema/appy-to-app-create-schema.json",
  "title": "AppCreate",
  "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/AppCreate",
  "type": "object",
  "required": [
    "name",
    "subdomain"
  ],
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 80
    },
    "subdomain": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{1,30}[a-z0-9])$",
      "description": "3-32 characters. Some names such as `api`, `www` or `docs` are reserved."
    },
    "ios": {
      "$ref": "#/$defs/IOSConfig"
    },
    "android": {
      "$ref": "#/$defs/AndroidConfig"
    },
    "strictAttribution": {
      "type": "boolean",
      "default": false,
      "description": "Strict attribution: only count installs Appy can verify; everything else is organic."
    },
    "appleAdsAttribution": {
      "type": "boolean",
      "default": true,
      "description": "Look up Apple Ads attribution for new iOS installs. No ATT prompt is needed."
    },
    "metaDecryptionKey": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{64}$",
      "writeOnly": true,
      "description": "The Install Referrer Decryption Key from your Meta app dashboard (App settings > Basic >\nAndroid). Lets Appy read Meta campaign data on Android installs. Stored encrypted.\n"
    }
  },
  "$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"
        }
      }
    }
  }
}