{
  "info": {
    "name": "WAAPI — Send Message API",
    "description": "Postman collection for the WAAPI External Send Message API.\n\nSet these collection variables before running:\n- base_url  → your backend URL (e.g. http://localhost:4151)\n- api_token → Bearer token from Setup → API Keys\n- phone_id  → Base64-encoded phone number ID (shown on API Keys page)\n- to        → recipient WhatsApp number in E.164 format\n\nOpen Collection → Variables tab to configure.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "base_url",  "value": "http://localhost:4151", "type": "string" },
    { "key": "api_token", "value": "YOUR_API_TOKEN_HERE",   "type": "string" },
    { "key": "phone_id",  "value": "YOUR_ENCODED_PHONE_ID", "type": "string" },
    { "key": "to",        "value": "+919876543210",          "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{api_token}}", "type": "string" }]
  },
  "item": [
    {
      "name": "── Media Messages ──",
      "item": [
        {
          "name": "1. Text Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"text\",\n  \"text\": \"Hello! How can we help you today?\"\n}"
            },
            "description": "Send a plain text message.\n\nRequired permission: send_text"
          }
        },
        {
          "name": "2. Image Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"image\",\n  \"media\": {\n    \"url\": \"https://example.com/banner.jpg\",\n    \"caption\": \"Check out our new collection!\"\n  }\n}"
            },
            "description": "Send an image with an optional caption.\n\nRequired permission: send_media"
          }
        },
        {
          "name": "3. Video Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"video\",\n  \"media\": {\n    \"url\": \"https://example.com/promo.mp4\",\n    \"caption\": \"Watch our product demo\"\n  }\n}"
            },
            "description": "Send a video with an optional caption.\n\nRequired permission: send_media"
          }
        },
        {
          "name": "4. Audio Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"audio\",\n  \"media\": {\n    \"url\": \"https://example.com/voice-note.mp3\"\n  }\n}"
            },
            "description": "Send an audio file (MP3 or OGG).\n\nRequired permission: send_media"
          }
        },
        {
          "name": "5. Document Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"document\",\n  \"media\": {\n    \"url\": \"https://example.com/invoice.pdf\",\n    \"filename\": \"Invoice_2025.pdf\",\n    \"caption\": \"Your invoice for March 2025\"\n  }\n}"
            },
            "description": "Send a PDF or other document.\n\nRequired permission: send_media"
          }
        }
      ]
    },
    {
      "name": "── Template Messages ──",
      "item": [
        {
          "name": "6a. Template — Body Variables",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"order_confirmation\",\n    \"language\": \"en_US\",\n    \"body\": {\n      \"variables\": [\"John\", \"ORD-12345\", \"₹1,299\"]\n    }\n  }\n}"
            },
            "description": "Send a template with positional body variables {{1}}, {{2}}, ...\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6b. Template — Image Header",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"product_promo\",\n    \"language\": \"en_US\",\n    \"header\": {\n      \"type\": \"image\",\n      \"url\": \"https://example.com/product.jpg\"\n    },\n    \"body\": {\n      \"variables\": [\"Summer Sale\", \"40%\"]\n    }\n  }\n}"
            },
            "description": "Template with image header and body variables.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6c. Template — Video Header",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"promo_video\",\n    \"language\": \"en_US\",\n    \"header\": {\n      \"type\": \"video\",\n      \"url\": \"https://example.com/promo.mp4\"\n    },\n    \"body\": {\n      \"variables\": [\"Exclusive Offer\"]\n    }\n  }\n}"
            },
            "description": "Template with video header.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6d. Template — Document Header",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"invoice_ready\",\n    \"language\": \"en_US\",\n    \"header\": {\n      \"type\": \"document\",\n      \"url\": \"https://example.com/invoices/INV-12345.pdf\",\n      \"filename\": \"INV-12345.pdf\"\n    },\n    \"body\": {\n      \"variables\": [\"John\", \"March 2025\", \"₹5,000\"]\n    }\n  }\n}"
            },
            "description": "Template with document header.\n\nOptional: `template.header.filename` sets the displayed file name on the recipient device. When omitted, WhatsApp uses the filename inferred from the URL.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6e. Template — Location Header",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"store_location\",\n    \"language\": \"en_US\",\n    \"header\": {\n      \"type\": \"location\",\n      \"latitude\": 28.6139,\n      \"longitude\": 77.2090,\n      \"name\": \"Our Store\",\n      \"address\": \"Connaught Place, New Delhi\"\n    }\n  }\n}"
            },
            "description": "Template with location header.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6f. Template — Quick-Reply Buttons",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"feedback_request\",\n    \"language\": \"en_US\",\n    \"body\": {\n      \"variables\": [\"your recent order\"]\n    },\n    \"buttons\": [\n      { \"index\": 0, \"sub_type\": \"quick_reply\", \"payload\": \"RATE_GOOD\" },\n      { \"index\": 1, \"sub_type\": \"quick_reply\", \"payload\": \"RATE_BAD\" }\n    ]\n  }\n}"
            },
            "description": "Template with quick-reply buttons. Payload is returned in webhook on button tap.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6g. Template — URL Button",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"track_order\",\n    \"language\": \"en_US\",\n    \"body\": {\n      \"variables\": [\"ORD-12345\"]\n    },\n    \"buttons\": [\n      { \"index\": 0, \"sub_type\": \"url\", \"url\": \"ORD-12345\" }\n    ]\n  }\n}"
            },
            "description": "Template with a dynamic URL button. 'url' is the suffix appended to the template's base URL.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6h. Template — OTP Copy Code",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"otp_message\",\n    \"language\": \"en_US\",\n    \"body\": {\n      \"variables\": [\"784521\"]\n    },\n    \"copy_code\": \"784521\"\n  }\n}"
            },
            "description": "OTP authentication template with COPY_CODE button.\n\nRequired permission: send_template"
          }
        },
        {
          "name": "6i. Template — Limited Time Offer (LTO)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template\": {\n    \"name\": \"flash_sale\",\n    \"language\": \"en_US\",\n    \"body\": {\n      \"variables\": [\"FLASH30\", \"30%\"]\n    },\n    \"lto\": {\n      \"expiration_time_ms\": 1740000000000\n    },\n    \"copy_code\": \"FLASH30\"\n  }\n}"
            },
            "description": "Limited Time Offer template with expiry time and copy code.\n\nRequired permission: send_template"
          }
        }
      ]
    },
    {
      "name": "── Interactive Messages ──",
      "item": [
        {
          "name": "7. Interactive — Button",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"button\",\n    \"header\": {\n      \"type\": \"text\",\n      \"text\": \"Choose an option\"\n    },\n    \"body\": \"How would you like to proceed?\",\n    \"footer\": \"Reply with a button below\",\n    \"buttons\": [\n      { \"id\": \"btn_yes\",  \"title\": \"Yes, confirm\" },\n      { \"id\": \"btn_no\",   \"title\": \"No, cancel\" },\n      { \"id\": \"btn_info\", \"title\": \"More info\" }\n    ]\n  }\n}"
            },
            "description": "Interactive message with up to 3 quick-reply buttons.\n\nRequired permission: send_interactive"
          }
        },
        {
          "name": "8. Interactive — CTA URL",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"cta_url\",\n    \"header\": {\n      \"type\": \"image\",\n      \"url\": \"https://example.com/banner.jpg\"\n    },\n    \"body\": \"Click below to view your order details.\",\n    \"footer\": \"WAAPI Store\",\n    \"url\": \"https://example.com/orders/12345\",\n    \"display_text\": \"View Order\"\n  }\n}"
            },
            "description": "Interactive message with a call-to-action URL button.\n\nRequired permission: send_interactive"
          }
        },
        {
          "name": "9. Interactive — List",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"list\",\n    \"body\": \"Please select a department\",\n    \"footer\": \"We're here to help\",\n    \"display_text\": \"Choose Department\",\n    \"sections\": [\n      {\n        \"title\": \"Support\",\n        \"rows\": [\n          { \"id\": \"tech_support\", \"title\": \"Technical Support\", \"description\": \"Help with technical issues\" },\n          { \"id\": \"billing\",      \"title\": \"Billing\",           \"description\": \"Invoices and payments\" }\n        ]\n      },\n      {\n        \"title\": \"Sales\",\n        \"rows\": [\n          { \"id\": \"new_order\",   \"title\": \"New Order\",   \"description\": \"Place a new order\" },\n          { \"id\": \"track_order\", \"title\": \"Track Order\", \"description\": \"Check delivery status\" }\n        ]\n      }\n    ]\n  }\n}"
            },
            "description": "Interactive message with a scrollable list picker.\n\nRequired permission: send_interactive"
          }
        }
      ]
    },
    {
      "name": "── Interactive Carousel ──",
      "item": [
        {
          "name": "10a. Interactive Carousel — Quick-Reply Buttons",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"carousel\",\n    \"body\": \"Browse our latest products\",\n    \"cards\": [\n      {\n        \"card_index\": 0,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product1.jpg\"\n        },\n        \"body\": \"Wireless Earbuds — Premium sound, all day comfort.\",\n        \"buttons\": [\n          { \"id\": \"buy_earbuds\",  \"title\": \"Buy Now\" },\n          { \"id\": \"info_earbuds\", \"title\": \"Learn More\" }\n        ]\n      },\n      {\n        \"card_index\": 1,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product2.jpg\"\n        },\n        \"body\": \"Smart Watch — Stay connected on the go.\",\n        \"buttons\": [\n          { \"id\": \"buy_watch\",  \"title\": \"Buy Now\" },\n          { \"id\": \"info_watch\", \"title\": \"Learn More\" }\n        ]\n      },\n      {\n        \"card_index\": 2,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product3.jpg\"\n        },\n        \"body\": \"Bluetooth Speaker — Room-filling bass.\",\n        \"buttons\": [\n          { \"id\": \"buy_speaker\",  \"title\": \"Buy Now\" },\n          { \"id\": \"info_speaker\", \"title\": \"Learn More\" }\n        ]\n      }\n    ]\n  }\n}"
            },
            "description": "Interactive carousel with quick-reply buttons per card.\n\nNo Meta template approval needed — content is fully dynamic.\nAll cards must have the same button structure.\n\nRequired permission: send_interactive"
          }
        },
        {
          "name": "10b. Interactive Carousel — CTA URL Buttons",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"carousel\",\n    \"body\": \"Explore our top deals today\",\n    \"cards\": [\n      {\n        \"card_index\": 0,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/deal1.jpg\"\n        },\n        \"body\": \"Flat 50% off on headphones. Limited stock!\",\n        \"cta_url\": {\n          \"display_text\": \"Shop Now\",\n          \"url\": \"https://example.com/deals/headphones\"\n        }\n      },\n      {\n        \"card_index\": 1,\n        \"header\": {\n          \"type\": \"video\",\n          \"url\": \"https://example.com/deal2.mp4\"\n        },\n        \"body\": \"New arrivals — Smartwatch collection.\",\n        \"cta_url\": {\n          \"display_text\": \"View Collection\",\n          \"url\": \"https://example.com/deals/smartwatches\"\n        }\n      }\n    ]\n  }\n}"
            },
            "description": "Interactive carousel with CTA URL buttons per card — each card opens a different URL.\n\nRequired permission: send_interactive"
          }
        },
        {
          "name": "10c. Interactive Carousel — Mixed (Quick-Reply + CTA URL)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"interactive\",\n  \"interactive\": {\n    \"type\": \"carousel\",\n    \"body\": \"Choose your favourite product\",\n    \"cards\": [\n      {\n        \"card_index\": 0,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product1.jpg\"\n        },\n        \"body\": \"Wireless Earbuds — ₹1,999\",\n        \"buttons\": [\n          { \"id\": \"add_cart_earbuds\", \"title\": \"Add to Cart\" }\n        ],\n        \"cta_url\": {\n          \"display_text\": \"View Details\",\n          \"url\": \"https://example.com/products/earbuds\"\n        }\n      },\n      {\n        \"card_index\": 1,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product2.jpg\"\n        },\n        \"body\": \"Smart Watch — ₹4,999\",\n        \"buttons\": [\n          { \"id\": \"add_cart_watch\", \"title\": \"Add to Cart\" }\n        ],\n        \"cta_url\": {\n          \"display_text\": \"View Details\",\n          \"url\": \"https://example.com/products/watch\"\n        }\n      }\n    ]\n  }\n}"
            },
            "description": "Interactive carousel with BOTH quick-reply buttons AND a CTA URL button per card — they coexist on the same card.\n\nRequired permission: send_interactive"
          }
        }
      ]
    },
    {
      "name": "── Carousel Template ──",
      "item": [
        {
          "name": "11. Carousel Template Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"carousel\",\n  \"carousel\": {\n    \"template_name\": \"product_carousel\",\n    \"language\": \"en_US\",\n    \"cards\": [\n      {\n        \"card_index\": 0,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product1.jpg\"\n        },\n        \"body\": {\n          \"variables\": [\"Wireless Earbuds\", \"₹1,999\"]\n        },\n        \"buttons\": [\n          { \"index\": 0, \"sub_type\": \"quick_reply\", \"payload\": \"BUY_EARBUDS\" },\n          { \"index\": 1, \"sub_type\": \"url\",         \"url\": \"earbuds\" }\n        ]\n      },\n      {\n        \"card_index\": 1,\n        \"header\": {\n          \"type\": \"image\",\n          \"url\": \"https://example.com/product2.jpg\"\n        },\n        \"body\": {\n          \"variables\": [\"Smart Watch\", \"₹4,999\"]\n        },\n        \"buttons\": [\n          { \"index\": 0, \"sub_type\": \"quick_reply\", \"payload\": \"BUY_WATCH\" },\n          { \"index\": 1, \"sub_type\": \"url\",         \"url\": \"watch\" }\n        ]\n      }\n    ]\n  }\n}"
            },
            "description": "Carousel powered by a pre-approved Meta carousel template.\nSupports body variable substitution per card.\n\nRequired permission: send_template"
          }
        }
      ]
    },
    {
      "name": "── Misc ──",
      "item": [
        {
          "name": "12. Text + Contact Auto-Create",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/send-message/{{phone_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "send-message", "{{phone_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"text\",\n  \"text\": \"Hi Ravi! Your order has been confirmed.\",\n  \"contact\": {\n    \"name\": \"Ravi Kumar\",\n    \"email\": \"ravi@example.com\"\n  }\n}"
            },
            "description": "Send a message and auto-create/update the contact in WAAPI Contacts.\n\nThe 'contact' field works with all message types."
          }
        },
        {
          "name": "13. Legacy — Flat Format (v1 endpoint)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/external/v1/messages",
              "host": ["{{base_url}}"],
              "path": ["api", "external", "v1", "messages"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"{{to}}\",\n  \"type\": \"template\",\n  \"template_name\": \"order_confirmation\",\n  \"template_language\": \"en_US\",\n  \"template_components\": [\n    {\n      \"type\": \"body\",\n      \"parameters\": [\n        { \"type\": \"text\", \"text\": \"John\" },\n        { \"type\": \"text\", \"text\": \"ORD-12345\" }\n      ]\n    }\n  ]\n}"
            },
            "description": "Legacy endpoint using flat body format — maintained for backwards compatibility.\nUse /send-message/:phoneId with the structured format for new integrations."
          }
        }
      ]
    }
  ]
}
