{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsarab-com/json-schema/whatsarab-com-post-api-otp-send-request-schema.json",
  "title": "PostApiOtpSendRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/whatsarab-com-openapi-generated.yml#/components/schemas/PostApiOtpSendRequest",
  "type": "object",
  "properties": {
    "to": {
      "type": "string",
      "description": "Recipient in E.164."
    },
    "template": {
      "type": "string",
      "description": "Approved authentication-category template name."
    },
    "language": {
      "type": "string",
      "description": "Template language. Default: `en`."
    },
    "code_length": {
      "type": "integer",
      "description": "Digits in the code, 4–8. Default: setting `otp.default_code_length` (6)."
    },
    "ttl_seconds": {
      "type": "integer",
      "description": "Seconds until the code expires, 60–5400. Default: setting `otp.default_ttl_seconds` (300)."
    },
    "max_attempts": {
      "type": "integer",
      "description": "Wrong codes allowed before the request is locked, 1–10. Default: setting `otp.default_max_attempts` (5)."
    },
    "purpose": {
      "type": "string",
      "description": "What the code is for. Default: `generic`."
    },
    "from": {
      "type": "string",
      "description": "Which of your workspace numbers sends the code."
    },
    "from_phone_number_id": {
      "type": "string",
      "description": "Alias of `from` kept for integrations written before Oct 2026."
    }
  },
  "required": [
    "to",
    "template"
  ]
}