{
    "info":  {
                 "name":  "SMSGatewayHub WhatsApp API v1",
                 "description":  "Docs: https://www.smsgatewayhub.com/cpaas/whatsapp/docs.ashx - set the apiKey variable to your sghwa_ key.",
                 "schema":  "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
             },
    "auth":  {
                 "type":  "bearer",
                 "bearer":  [
                                {
                                    "key":  "token",
                                    "type":  "string",
                                    "value":  "{{apiKey}}"
                                }
                            ]
             },
    "variable":  [
                     {
                         "key":  "baseUrl",
                         "value":  "https://www.smsgatewayhub.com/cpaas/whatsapp/api.ashx"
                     },
                     {
                         "key":  "apiKey",
                         "value":  "sghwa_YOUR_KEY"
                     }
                 ],
    "item":  [
                 {
                     "name":  "Send",
                     "item":  [
                                  {
                                      "name":  "Send template",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "Business-initiated message using an approved template.",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"template\":  \"order_update\",\r\n    \"language\":  \"en\",\r\n    \"variables\":  [\r\n                      \"Ravi\",\r\n                      \"#A1043\",\r\n                      \"Friday\"\r\n                  ],\r\n    \"ref\":  \"order-1043\"\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send OTP",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "Authentication template - the code is the only variable.",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"template\":  \"login_otp\",\r\n    \"language\":  \"en\",\r\n    \"variables\":  [\r\n                      \"482913\"\r\n                  ]\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send text (24-hour window)",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "Session message.",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"text\",\r\n    \"text\":  \"Thanks! Your order ships tomorrow.\"\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send document (24-hour window)",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"document\",\r\n    \"media\":  {\r\n                  \"link\":  \"https://www.example.com/invoice.pdf\",\r\n                  \"filename\":  \"invoice.pdf\",\r\n                  \"caption\":  \"Your invoice\"\r\n              }\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send reply buttons",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"interactive\",\r\n    \"interactive\":  {\r\n                        \"type\":  \"buttons\",\r\n                        \"body\":  \"When should we deliver?\",\r\n                        \"buttons\":  [\r\n                                        {\r\n                                            \"id\":  \"slot_morning\",\r\n                                            \"title\":  \"Morning\"\r\n                                        },\r\n                                        {\r\n                                            \"id\":  \"slot_evening\",\r\n                                            \"title\":  \"Evening\"\r\n                                        }\r\n                                    ]\r\n                    }\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send list",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"interactive\",\r\n    \"interactive\":  {\r\n                        \"type\":  \"list\",\r\n                        \"body\":  \"Choose a plan\",\r\n                        \"button\":  \"See plans\",\r\n                        \"sections\":  [\r\n                                         {\r\n                                             \"title\":  \"Plans\",\r\n                                             \"rows\":  [\r\n                                                          {\r\n                                                              \"id\":  \"plan_starter\",\r\n                                                              \"title\":  \"Starter\",\r\n                                                              \"description\":  \"Rs 999 / month\"\r\n                                                          }\r\n                                                      ]\r\n                                         }\r\n                                     ]\r\n                    }\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Send link button",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=send",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "send"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"interactive\",\r\n    \"interactive\":  {\r\n                        \"type\":  \"cta_url\",\r\n                        \"body\":  \"Your order is on the way.\",\r\n                        \"text\":  \"Track order\",\r\n                        \"url\":  \"https://www.example.com/track/A1043\"\r\n                    }\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Bulk / campaign",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=bulk",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "bulk"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "Up to 1000 recipients; optional scheduleAt.",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"template\":  \"payment_reminder\",\r\n    \"language\":  \"en\",\r\n    \"name\":  \"October dues\",\r\n    \"recipients\":  [\r\n                       {\r\n                           \"to\":  \"919876543210\",\r\n                           \"variables\":  [\r\n                                             \"Ravi\",\r\n                                             \"1,250\"\r\n                                         ],\r\n                           \"ref\":  \"inv-1\"\r\n                       }\r\n                   ]\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Meta-compatible send",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=meta",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "meta"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "Body = Meta Cloud API /messages JSON. Response = Meta response + sgh_message_id.",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"messaging_product\":  \"whatsapp\",\r\n    \"to\":  \"919876543210\",\r\n    \"type\":  \"text\",\r\n    \"text\":  {\r\n                 \"body\":  \"Hello from the Meta-compatible API\"\r\n             },\r\n    \"biz_opaque_callback_data\":  \"my-ref-1\"\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  }
                              ]
                 },
                 {
                     "name":  "Track",
                     "item":  [
                                  {
                                      "name":  "Status by id",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=status\u0026id=1045",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "status"
                                                                                },
                                                                                {
                                                                                    "key":  "id",
                                                                                    "value":  "1045"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "Status of many",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=status\u0026ids=1045,1046",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "status"
                                                                                },
                                                                                {
                                                                                    "key":  "ids",
                                                                                    "value":  "1045,1046"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "List messages",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=messages\u0026from=2026-10-01\u0026to=2026-10-06",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "messages"
                                                                                },
                                                                                {
                                                                                    "key":  "from",
                                                                                    "value":  "2026-10-01"
                                                                                },
                                                                                {
                                                                                    "key":  "to",
                                                                                    "value":  "2026-10-06"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  }
                              ]
                 },
                 {
                     "name":  "Resources",
                     "item":  [
                                  {
                                      "name":  "Templates",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=templates",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "templates"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "Contact and 24-hour window",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=contact\u0026number=919876543210",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "contact"
                                                                                },
                                                                                {
                                                                                    "key":  "number",
                                                                                    "value":  "919876543210"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "Opt-outs",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=optouts",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "optouts"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "Add opt-out",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [
                                                                     {
                                                                         "key":  "Content-Type",
                                                                         "value":  "application/json"
                                                                     }
                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=optout",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "optout"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  "",
                                                      "body":  {
                                                                   "mode":  "raw",
                                                                   "raw":  "{\r\n    \"number\":  \"919876543210\",\r\n    \"op\":  \"add\"\r\n}",
                                                                   "options":  {
                                                                                   "raw":  {
                                                                                               "language":  "json"
                                                                                           }
                                                                               }
                                                               }
                                                  }
                                  },
                                  {
                                      "name":  "Balance",
                                      "request":  {
                                                      "method":  "GET",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=balance",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "balance"
                                                                                }
                                                                            ]
                                                              },
                                                      "description":  ""
                                                  }
                                  },
                                  {
                                      "name":  "Upload media",
                                      "request":  {
                                                      "method":  "POST",
                                                      "header":  [

                                                                 ],
                                                      "url":  {
                                                                  "raw":  "{{baseUrl}}?action=media",
                                                                  "host":  [
                                                                               "{{baseUrl}}"
                                                                           ],
                                                                  "query":  [
                                                                                {
                                                                                    "key":  "action",
                                                                                    "value":  "media"
                                                                                }
                                                                            ]
                                                              },
                                                      "body":  {
                                                                   "mode":  "formdata",
                                                                   "formdata":  [
                                                                                    {
                                                                                        "key":  "file",
                                                                                        "type":  "file",
                                                                                        "src":  ""
                                                                                    }
                                                                                ]
                                                               }
                                                  }
                                  }
                              ]
                 }
             ]
}