{
  "info": {
    "_postman_id": "a7c2e0e8-5f12-4b78-9d21-runotp2026v1",
    "name": "RunOTP API v1 — Reverse WhatsApp & Telegram OTP + 2-Way Gateway",
    "description": "Official RunOTP API v1.0 Postman Collection (X-RunOTP-API-Version: 1.0). Supports Dual-Channel WhatsApp + Telegram OTP, Flash Start auto-config, and Dedicated VIP outbound messaging. Set {{apiKey}} and {{apiSecret}} in Collection Variables.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "apiBaseUrl", "value": "https://api.runotp.com", "type": "string" },
    { "key": "webBaseUrl", "value": "https://runotp.com", "type": "string" },
    { "key": "apiKey", "value": "YOUR_API_KEY", "type": "string" },
    { "key": "apiSecret", "value": "YOUR_API_SECRET", "type": "string" },
    { "key": "flashToken", "value": "v_PASTE_TOKEN_FROM_REDIRECT", "type": "string" },
    { "key": "testPhone", "value": "201012345678", "type": "string" }
  ],
  "item": [
    {
      "name": "1. Generate WhatsApp + Telegram OTP Links & QR (POST /v1/links)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"apiKey\": \"{{apiKey}}\",\n  \"apiSecret\": \"{{apiSecret}}\",\n  \"msg\": \"Please ({{apiKey}}) activate my account with code (482910)\",\n  \"channel\": \"both\",\n  \"lang\": \"en\"\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/links",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "links"]
        }
      }
    },
    {
      "name": "1b. Generate Telegram-Only OTP Link & QR (POST /v1/links)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"apiKey\": \"{{apiKey}}\",\n  \"apiSecret\": \"{{apiSecret}}\",\n  \"msg\": \"Please ({{apiKey}}) activate my account with code (482910)\",\n  \"channel\": \"telegram\",\n  \"lang\": \"ar\"\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/links",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "links"]
        }
      }
    },
    {
      "name": "2. Auto-Configure Flash Start (POST /v1/flash/config)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "x-api-secret", "value": "{{apiSecret}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"apiKey\": \"{{apiKey}}\",\n  \"apiSecret\": \"{{apiSecret}}\",\n  \"redirectUrl\": \"https://yourstore.com/verify/callback\",\n  \"brandName\": \"My Store\",\n  \"theme\": \"auto\",\n  \"brandColor\": \"#D4AF37\",\n  \"isDark\": true,\n  \"channels\": \"both\"\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/flash/config",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "flash", "config"]
        }
      }
    },
    {
      "name": "3. Verify Flash Start Token (POST /v1/flash/verify)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "x-api-secret", "value": "{{apiSecret}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"token\": \"{{flashToken}}\"\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/flash/verify",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "flash", "verify"]
        }
      }
    },
    {
      "name": "4. Send Outbound Text — VIP (POST /v1/messages)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"apiKey\": \"{{apiKey}}\",\n  \"apiSecret\": \"{{apiSecret}}\",\n  \"destinationNumber\": \"{{testPhone}}\",\n  \"message\": \"Welcome! Your order #9021 has been confirmed.\",\n  \"mediaUrl\": \"\",\n  \"clientRef\": \"ORD_9021\",\n  \"typingDelay\": 1500\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/messages",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "messages"]
        }
      }
    },
    {
      "name": "5. Send Outbound Image or PDF — VIP (POST /v1/messages)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"apiKey\": \"{{apiKey}}\",\n  \"apiSecret\": \"{{apiSecret}}\",\n  \"destinationNumber\": \"{{testPhone}}\",\n  \"message\": \"Your invoice PDF is attached.\",\n  \"mediaUrl\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\",\n  \"clientRef\": \"INV_9021\",\n  \"typingDelay\": 1500\n}"
        },
        "url": {
          "raw": "{{apiBaseUrl}}/v1/messages",
          "host": ["{{apiBaseUrl}}"],
          "path": ["v1", "messages"]
        }
      }
    }
  ]
}