{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/envoisms-ma/json-schema/envoisms-ma-verify-send-request-schema.json",
  "title": "VerifySendRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/envoisms-ma-api-openapi.json#/components/schemas/VerifySendRequest",
  "type": "object",
  "required": [
    "to"
  ],
  "properties": {
    "to": {
      "type": "string"
    },
    "channel": {
      "type": "string",
      "enum": [
        "sms",
        "whatsapp",
        "telegram",
        "voice",
        "rcs"
      ],
      "default": "sms",
      "description": "whatsapp = EnvoiSMS generates a 6-digit code and delivers it with its own WhatsApp authentication template, nothing to store on your side. The code is valid for expiry seconds, capped at 600 (10 minutes, also the default). If WhatsApp refuses the submission, the code is sent by SMS instead; an SMS follow-up after a delay happens only with a Verify application (app_id) whose channel list includes sms with auto-cascade on. code_length and template are ignored in this mode. sms = classic mode: you control code length, expiry, template and sender. Both modes are confirmed with the same /verify/check call."
    },
    "otp_type": {
      "type": "string",
      "enum": [
        "copy_code",
        "one_tap",
        "zero_tap",
        "url"
      ],
      "default": "copy_code",
      "description": "WhatsApp Authentication template button type (copy_code, one_tap autofill, zero_tap, or url)."
    },
    "package_name": {
      "type": "string",
      "description": "Android application package name for One-Tap / Zero-Tap Autofill"
    },
    "signature_hash": {
      "type": "string",
      "description": "Android app signature hash (SMS Retriever / Autofill API)"
    },
    "code_length": {
      "type": "integer",
      "minimum": 4,
      "maximum": 8,
      "default": 6,
      "description": "sms channel only — whatsapp verifications always use 6 digits"
    },
    "expiry": {
      "type": "integer",
      "description": "Code validity in seconds, 60–1800 (default 600). On the whatsapp channel it is capped at 600, the authentication template's own limit.",
      "default": 600
    },
    "app_id": {
      "type": "string",
      "description": "Verify Application ID configured in dashboard. If set, channels parameters and cascade logic are automatically managed."
    },
    "brand": {
      "type": "string",
      "description": "Brand name shown in OTP message"
    },
    "template": {
      "type": "string",
      "description": "Custom OTP message. Use {{code}} and {{brand}} placeholders."
    },
    "otp_button_text": {
      "type": "string",
      "maxLength": 25,
      "description": "Custom label for the WhatsApp click-to-copy OTP button"
    },
    "web_otp_domain": {
      "type": "string",
      "description": "Target domain for W3C WebOTP browser autofill (appends @domain #code to the SMS)"
    },
    "app_hash": {
      "type": "string",
      "description": "11-character Android SMS Retriever API application hash for automatic Android OTP detection"
    },
    "auto_cascade": {
      "type": "boolean",
      "description": "When the code was sent on WhatsApp and WhatsApp cannot deliver it, fall back to SMS automatically"
    }
  }
}