{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/riskified/main/json-schema/riskified-otp-initiate-request-schema.json",
  "title": "OtpInitiateRequest",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/riskified-otp-recovery-openapi.yml#/components/schemas/OtpInitiateRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for the order"
    },
    "challenge_access_token": {
      "type": "string",
      "minLength": 32,
      "description": "A unique token generated by the merchant. It is used to validate that the order matches the OTP after a successful OTP verification.\nThis is critical to ensure that users cannot tamper with the OTP verification process.\nThe token has to be at least 32 characters long and hard to guess - we recommend on using UUID"
    },
    "localization_language": {
      "type": "string",
      "enum": [
        "en-US",
        "es-ES",
        "fr-FR"
      ],
      "description": "The widget localization language.\nThe language codes currently supported:\n* “en-US” (English US)\n* “es-ES” (Spanish Spain)\n* “fr-FR” (French France)\n\n Contact your Integration Engineer for instructions on expanded language support."
    },
    "contact_details": {
      "type": "string",
      "description": "The merchant’s support contact email"
    },
    "channel_method": {
      "$ref": "#/$defs/channel_method",
      "description": "OTP channel details"
    }
  },
  "required": [
    "id",
    "challenge_access_token",
    "localization_language",
    "channel_type",
    "sender_name"
  ],
  "$defs": {
    "channel_method": {
      "type": "object",
      "properties": {
        "channel_type": {
          "type": "string",
          "enum": [
            "Sms"
          ],
          "description": "The OTP sending medium - currently only 'Sms' (case-sensitive) is available"
        },
        "sender_name": {
          "type": "string",
          "description": "The name of the sender (merchant) that will appear in the SMS"
        }
      },
      "required": [
        "channel_type",
        "sender_name"
      ]
    }
  }
}