{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsmileapi/json-schema/getsmileapi-alpha-footprint-post-request-schema.json",
  "title": "AlphaFootprintPostRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-footprints-alpha-api-openapi.yml#/components/schemas/AlphaFootprintPostRequest",
  "oneOf": [
    {
      "$ref": "#/$defs/AlphaFootprintTplEmailPostRequest1"
    },
    {
      "$ref": "#/$defs/AlphaFootprintTplEmailPostRequest2"
    },
    {
      "$ref": "#/$defs/AlphaFootprintTplEmailPostRequest3"
    },
    {
      "$ref": "#/$defs/AlphaFootprintTplMobilePostRequest1"
    },
    {
      "$ref": "#/$defs/AlphaFootprintTplMobilePostRequest2"
    },
    {
      "$ref": "#/$defs/AlphaFootprintTplScorePostRequest"
    }
  ],
  "$defs": {
    "AlphaFootprintTplEmailPostRequest1": {
      "type": "object",
      "required": [
        "consent",
        "templateId",
        "emailAddress"
      ],
      "properties": {
        "emailAddress": {
          "type": "string",
          "description": "The email address of the subject. It must be a valid email address. `Required` for tpl-ftp005001."
        },
        "countryCode": {
          "$ref": "#/$defs/RefCountry"
        },
        "templateId": {
          "type": "string",
          "description": "Fixed to `tpl-email-footprint` (or legacy `tpl-ftp005001`, deprecated)."
        },
        "footprintItemsTimeout": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30,
          "description": "Timeout in seconds for footprint items. If exceeded, returns completed footprint items, others items' values will be null."
        },
        "consent": {
          "$ref": "#/$defs/Consent"
        }
      }
    },
    "AlphaFootprintTplEmailPostRequest2": {
      "allOf": [
        {
          "$ref": "#/$defs/AlphaFootprintTplEmailPostRequest1"
        }
      ]
    },
    "AlphaFootprintTplEmailPostRequest3": {
      "allOf": [
        {
          "$ref": "#/$defs/AlphaFootprintTplEmailPostRequest1"
        }
      ]
    },
    "AlphaFootprintTplMobilePostRequest1": {
      "type": "object",
      "required": [
        "consent",
        "templateId",
        "mobileNumber"
      ],
      "properties": {
        "mobileNumber": {
          "type": "string",
          "description": "Subject's mobile number. `Required`. Must start with country code i.e. 639559991234, and no leading zeros."
        },
        "countryCode": {
          "$ref": "#/$defs/RefCountry"
        },
        "templateId": {
          "type": "string",
          "description": "Fixed to `tpl-mobile-footprint` (or legacy `tpl-ftp005002`, deprecated)."
        },
        "footprintItemsTimeout": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30,
          "description": "Timeout in seconds for footprint items. If exceeded, returns completed footprint items, others items' values will be null."
        },
        "consent": {
          "$ref": "#/$defs/Consent"
        }
      }
    },
    "AlphaFootprintTplMobilePostRequest2": {
      "allOf": [
        {
          "$ref": "#/$defs/AlphaFootprintTplMobilePostRequest1"
        }
      ]
    },
    "AlphaFootprintTplScorePostRequest": {
      "type": "object",
      "required": [
        "consent",
        "templateId",
        "emailAddress",
        "mobileNumber",
        "countryCode"
      ],
      "properties": {
        "emailAddress": {
          "type": "string",
          "description": "The email address of the subject. It must be a valid email address. `Required` for tpl-score-footprint."
        },
        "mobileNumber": {
          "type": "string",
          "description": "Subject's mobile number. `Required`. Must start with country code i.e. 639559991234, and no leading zeros."
        },
        "countryCode": {
          "$ref": "#/$defs/RefCountry"
        },
        "templateId": {
          "type": "string",
          "description": "Fixed to `tpl-score-footprint`."
        },
        "footprintItemsTimeout": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30,
          "description": "Timeout in seconds for footprint items. If exceeded, returns completed footprint items, others items' values will be null."
        },
        "consent": {
          "$ref": "#/$defs/Consent"
        }
      }
    },
    "Consent": {
      "type": "object",
      "required": [
        "consentedAt",
        "consentedWith"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The internal name of your consent document (e.g. \"Terms and Conditions\" or \"Privacy Policy\"); your own reference label"
        },
        "version": {
          "type": "string",
          "description": "Your internal version identifier for this consent document (e.g. \"1.0.0\")"
        },
        "consentedAt": {
          "allOf": [
            {
              "$ref": "#/$defs/RefDateTime"
            }
          ],
          "description": "The date and time the subject accepted your consent document, typically when they tapped \"I agree\" in your app. Not the time of this API call. Use ISO 8601 format, e.g. \"2024-04-14T09:30:24Z\""
        },
        "consentedWith": {
          "type": "string",
          "description": "The exact text of the button or checkbox the user clicked to give consent, e.g. \"I agree to the Terms and Conditions\""
        },
        "consentTemplateId": {
          "type": "string",
          "description": "ID of a stored Consent Template. Retrieve from the Developer Portal or GET /consentTemplates. Overrides any inline fields above when provided."
        }
      }
    },
    "RefCountry": {
      "type": [
        "string",
        "null"
      ],
      "title": "Country ISO Codes",
      "enum": [
        "AF",
        "AX",
        "AL",
        "DZ",
        "AS",
        "AD",
        "AO",
        "AI",
        "AQ",
        "AG",
        "AR",
        "AM",
        "AW",
        "AU",
        "AT",
        "AZ",
        "BS",
        "BH",
        "BD",
        "BB",
        "BY",
        "BE",
        "BZ",
        "BJ",
        "BM",
        "BT",
        "BO",
        "BQ",
        "BA",
        "BW",
        "BV",
        "BR",
        "IO",
        "BN",
        "BG",
        "BF",
        "BI",
        "KH",
        "CM",
        "CA",
        "CV",
        "KY",
        "CF",
        "TD",
        "CL",
        "CN",
        "CX",
        "CC",
        "CO",
        "KM",
        "CG",
        "CD",
        "CK",
        "CR",
        "CI",
        "HR",
        "CU",
        "CW",
        "CY",
        "CZ",
        "DK",
        "DJ",
        "DM",
        "DO",
        "EC",
        "EG",
        "SV",
        "GQ",
        "ER",
        "EE",
        "ET",
        "FK",
        "FO",
        "FJ",
        "FI",
        "FR",
        "GF",
        "PF",
        "TF",
        "GA",
        "GM",
        "GE",
        "DE",
        "GH",
        "GI",
        "GR",
        "GL",
        "GD",
        "GP",
        "GU",
        "GT",
        "GG",
        "GN",
        "GW",
        "GY",
        "HT",
        "HM",
        "VA",
        "HN",
        "HK",
        "HU",
        "IS",
        "IN",
        "ID",
        "IR",
        "IQ",
        "IE",
        "IM",
        "IL",
        "IT",
        "JM",
        "JP",
        "JE",
        "JO",
        "KZ",
        "KE",
        "KI",
        "KP",
        "KR",
        "XK",
        "KW",
        "KG",
        "LA",
        "LV",
        "LB",
        "LS",
        "LR",
        "LY",
        "LI",
        "LT",
        "LU",
        "MO",
        "MK",
        "MG",
        "MW",
        "MY",
        "MV",
        "ML",
        "MT",
        "MH",
        "MQ",
        "MR",
        "MU",
        "YT",
        "MX",
        "FM",
        "MD",
        "MC",
        "MN",
        "ME",
        "MS",
        "MA",
        "MZ",
        "MM",
        "NA",
        "NR",
        "NP",
        "NL",
        "AN",
        "NC",
        "NZ",
        "NI",
        "NE",
        "NG",
        "NU",
        "NF",
        "MP",
        "NO",
        "OM",
        "PK",
        "PW",
        "PS",
        "PA",
        "PG",
        "PY",
        "PE",
        "PH",
        "PN",
        "PL",
        "PT",
        "PR",
        "QA",
        "RS",
        "RE",
        "RO",
        "RU",
        "RW",
        "BL",
        "SH",
        "KN",
        "LC",
        "MF",
        "PM",
        "VC",
        "WS",
        "SM",
        "ST",
        "SA",
        "SN",
        "CS",
        "SC",
        "SL",
        "SG",
        "SX",
        "SK",
        "SI",
        "SB",
        "SO",
        "ZA",
        "GS",
        "SS",
        "ES",
        "LK",
        "SD",
        "SR",
        "SJ",
        "SZ",
        "SE",
        "CH",
        "SY",
        "TW",
        "TJ",
        "TZ",
        "TH",
        "TL",
        "TG",
        "TK",
        "TO",
        "TT",
        "TN",
        "TR",
        "XT",
        "TM",
        "TC",
        "TV",
        "UG",
        "UA",
        "AE",
        "GB",
        "US",
        "UM",
        "UY",
        "UZ",
        "VU",
        "VE",
        "VN",
        "VG",
        "VI",
        "WF",
        "EH",
        "YE",
        "ZM",
        "ZW",
        null
      ],
      "description": "2 character alpha ISO-3166 codes"
    },
    "RefDateTime": {
      "type": "string",
      "title": "Date and Time string",
      "format": "date-time",
      "description": "Date and time"
    }
  }
}