{
  "info": {
    "name": "WaSaaS WhatsApp API v1",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Set base_url and api_key in the collection variables. Use a wsk_test_ key to try everything without sending or paying."
  },
  "item": [
    {
      "name": "Messages",
      "item": [
        {
          "name": "Send template",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "order-1042"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/messages",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "messages"
              ]
            },
            "description": "Approved template. Idempotency-Key header prevents double sends.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919876543210\",\n  \"type\": \"template\",\n  \"template_id\": 2,\n  \"values\": {\n    \"body.1\": \"Ravi\",\n    \"body.2\": \"B.Tech\"\n  },\n  \"opt_in\": {\n    \"proof\": \"website form\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send text (24 h window)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/messages",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "messages"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919876543210\",\n  \"type\": \"text\",\n  \"text\": \"Your order has shipped!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send document",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/messages",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "messages"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919876543210\",\n  \"type\": \"document\",\n  \"media_key\": \"<from Upload file>\",\n  \"text\": \"Your invoice\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Upload file",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/media",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "media"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": ""
                }
              ]
            }
          }
        },
        {
          "name": "Message status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/messages/{{message_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "messages",
                "{{message_id}}"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "OTP",
      "item": [
        {
          "name": "Send OTP",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/otp/send",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "otp",
                "send"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919876543210\",\n  \"template_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Verify OTP",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/otp/verify",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "otp",
                "verify"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"otp_id\": 0,\n  \"code\": \"123456\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Contacts",
      "item": [
        {
          "name": "Find contact",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/contacts?phone=%2B919876543210",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "contacts"
              ],
              "query": [
                {
                  "key": "phone",
                  "value": "%2B919876543210"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create / update contact",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/contacts",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "contacts"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"+919876543210\",\n  \"name\": \"Ravi Patil\",\n  \"tags\": [\n    \"website\"\n  ],\n  \"custom_fields\": {\n    \"city\": \"Pune\"\n  },\n  \"opt_in\": {\n    \"proof\": \"signup form\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Templates & account",
      "item": [
        {
          "name": "List approved templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/templates",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "templates"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Wallet balance",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/account/balance",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "account",
                "balance"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Campaigns",
      "item": [
        {
          "name": "List campaigns",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create + start campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Diwali offer\",\n  \"template_id\": 2,\n  \"audience\": {\n    \"tags_any\": [\n      \"vip\"\n    ]\n  },\n  \"send_at\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Campaign status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns/{{campaign_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns",
                "{{campaign_id}}"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Pause",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns/{{campaign_id}}/pause",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns",
                "{{campaign_id}}",
                "pause"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Resume",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns/{{campaign_id}}/resume",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns",
                "{{campaign_id}}",
                "resume"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Cancel",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/campaigns/{{campaign_id}}/cancel",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "campaigns",
                "{{campaign_id}}",
                "cancel"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "COD order confirmations",
      "item": [
        {
          "name": "Ask to confirm",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/orders/confirmations",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "orders",
                "confirmations"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"+919876543210\",\n  \"name\": \"Asha\",\n  \"order_id\": \"5001\",\n  \"order_number\": \"#5001\",\n  \"total\": \"Rs 899\",\n  \"template_name\": \"cod_confirm\",\n  \"language\": \"en\"\n}"
            }
          }
        },
        {
          "name": "Find by order id",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/orders/confirmations?order_id=5001",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "orders",
                "confirmations"
              ],
              "query": [
                {
                  "key": "order_id",
                  "value": "5001"
                }
              ]
            }
          }
        },
        {
          "name": "Get one",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/orders/confirmations/1",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "orders",
                "confirmations",
                "1"
              ]
            }
          }
        },
        {
          "name": "Simulate answer (sandbox)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/orders/confirmations/1/simulate",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "orders",
                "confirmations",
                "1",
                "simulate"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"answer\": \"confirm\"\n}"
            }
          }
        }
      ]
    },
    {
      "name": "Appointments",
      "item": [
        {
          "name": "Services",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/appointments/services",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "appointments",
                "services"
              ]
            }
          }
        },
        {
          "name": "Free slots",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/appointments/slots?service_id=1&date=2026-11-12",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "appointments",
                "slots"
              ],
              "query": [
                {
                  "key": "service_id",
                  "value": "1"
                },
                {
                  "key": "date",
                  "value": "2026-11-12"
                }
              ]
            }
          }
        },
        {
          "name": "Book",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/appointments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "appointments"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"service_id\": 1,\n  \"starts_at\": \"2026-11-12T10:00:00+05:30\",\n  \"phone\": \"+919876543210\",\n  \"name\": \"Ravi\"\n}"
            }
          }
        },
        {
          "name": "Get one",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/appointments/1",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "appointments",
                "1"
              ]
            }
          }
        },
        {
          "name": "Cancel",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/appointments/1/cancel",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "appointments",
                "1",
                "cancel"
              ]
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://whatsapp.unimanage.in/api"
    },
    {
      "key": "api_key",
      "value": "wsk_test_..."
    },
    {
      "key": "message_id",
      "value": ""
    },
    {
      "key": "campaign_id",
      "value": ""
    }
  ]
}