{
  "info": {
    "name": "WpAi API",
    "description": "Send WhatsApp messages, manage message templates and receive webhooks.\n\nSet `baseUrl` and `apiKey`, then send. `apiKey` wants a key with the `messages:send` scope.\n\nThe **Website widget** folder is the exception: it needs a widget-scoped key, which is safe to publish in page source. Override `apiKey` on that folder rather than using your server key there.\n\nRequests with `:id` in the path are placeholders — substitute a real id before sending.\n\nGenerated from the documentation source; do not edit by hand.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.wpai.co.in",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    },
    {
      "key": "wabaAccountId",
      "value": "",
      "type": "string"
    },
    {
      "key": "templateId",
      "value": "",
      "type": "string"
    },
    {
      "key": "sessionId",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Sending messages",
      "description": "One endpoint for every message type, on both channels.",
      "item": [
        {
          "name": "Your connected numbers and what each can do. Start here for the ids below",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/channels",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels"
              ]
            },
            "description": "Your connected numbers and what each can do. Start here for the ids below.\n\nDocs: https://wpai.co.in/docs/messaging"
          }
        },
        {
          "name": "Send a text message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send"
              ]
            },
            "description": "Send a text message.\n\nDocs: https://wpai.co.in/docs/messaging/text",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"919876543210\",\n  \"channel\": \"whatsapp_cloud\",\n  \"type\": \"text\",\n  \"text\": \"Your order has shipped.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send media by URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send"
              ]
            },
            "description": "Send media by URL.\n\nDocs: https://wpai.co.in/docs/messaging/media",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"919876543210\",\n  \"channel\": \"whatsapp_cloud\",\n  \"type\": \"document\",\n  \"mediaUrl\": \"https://files.example.com/invoices/4471.pdf\",\n  \"filename\": \"Invoice-4471.pdf\",\n  \"caption\": \"Your invoice for order 4471.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send an approved template",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send"
              ]
            },
            "description": "Send an approved template.\n\nDocs: https://wpai.co.in/docs/messaging/templates",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"919876543210\",\n  \"channel\": \"whatsapp_cloud\",\n  \"type\": \"template\",\n  \"templateId\": \"{{templateId}}\",\n  \"variableMapping\": {\n    \"1\": \"name\",\n    \"2\": \"literal:4471\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send a template with an image, video or document header",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send"
              ]
            },
            "description": "Send a template with an image, video or document header.\n\nDocs: https://wpai.co.in/docs/messaging/templates",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"919876543210\",\n  \"channel\": \"whatsapp_cloud\",\n  \"type\": \"template\",\n  \"templateId\": \"{{templateId}}\",\n  \"headerMediaUrl\": \"https://files.example.com/banners/diwali.jpg\",\n  \"variableMapping\": {\n    \"1\": \"name\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Templates",
      "description": "Create a template over the API; Meta reviews it and tells your webhook.",
      "item": [
        {
          "name": "List templates, filtered by status, category or number",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates?status=APPROVED",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "APPROVED"
                }
              ]
            },
            "description": "List templates, filtered by status, category or number.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates"
          }
        },
        {
          "name": "Create a template and submit it to Meta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates"
              ]
            },
            "description": "Create a template and submit it to Meta.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates/components",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"wabaAccountId\": \"{{wabaAccountId}}\",\n  \"name\": \"order_shipped\",\n  \"language\": \"en_US\",\n  \"category\": \"UTILITY\",\n  \"components\": [\n    {\n      \"type\": \"HEADER\",\n      \"format\": \"TEXT\",\n      \"text\": \"Order update\"\n    },\n    {\n      \"type\": \"BODY\",\n      \"text\": \"Hi {{1}}, your order {{2}} has shipped.\",\n      \"example\": {\n        \"body_text\": [\n          [\n            \"Priya\",\n            \"4471\"\n          ]\n        ]\n      }\n    },\n    {\n      \"type\": \"FOOTER\",\n      \"text\": \"Reply STOP to opt out\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Read one template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Read one template.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates"
          }
        },
        {
          "name": "Upload a header sample and get a Meta handle",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/media",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                "media"
              ]
            },
            "description": "Upload a header sample and get a Meta handle.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates/media",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "value": ""
                },
                {
                  "key": "wabaAccountId",
                  "type": "text",
                  "value": "<wabaAccountId>"
                },
                {
                  "key": "kind",
                  "type": "text",
                  "value": "<kind>"
                }
              ]
            }
          }
        },
        {
          "name": "Stream the stored header sample back",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/:id/media",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                ":id",
                "media"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Stream the stored header sample back.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates/media"
          }
        },
        {
          "name": "Refresh one template’s status from Meta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/:id/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                ":id",
                "sync"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Refresh one template’s status from Meta.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates"
          }
        },
        {
          "name": "Refresh every template on a number",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/waba/:wabaAccountId/sync",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                "waba",
                ":wabaAccountId",
                "sync"
              ],
              "variable": [
                {
                  "key": "wabaAccountId",
                  "value": "<wabaAccountId>"
                }
              ]
            },
            "description": "Refresh every template on a number.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates"
          }
        },
        {
          "name": "Import templates that already exist at Meta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/import",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                "import"
              ]
            },
            "description": "Import templates that already exist at Meta.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"wabaAccountId\": \"{{wabaAccountId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete here and at Meta. Removes every language variant",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Delete here and at Meta. Removes every language variant.\n\nRequires the campaigns plan feature.\n\nDocs: https://wpai.co.in/docs/templates"
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Register where we should POST events. Organization administrator only.",
      "item": [
        {
          "name": "Your webhooks and the events available to subscribe to",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/org/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "org",
                "webhooks"
              ]
            },
            "description": "Your webhooks and the events available to subscribe to.\n\nDocs: https://wpai.co.in/docs/webhooks"
          }
        },
        {
          "name": "Register an endpoint, optionally with your own signing key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/org/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "org",
                "webhooks"
              ]
            },
            "description": "Register an endpoint, optionally with your own signing key.\n\nDocs: https://wpai.co.in/docs/webhooks",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/hooks/wpai\",\n  \"events\": [\n    \"message.inbound\",\n    \"message.status\",\n    \"template.status\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Change its events, URL, enabled state or signing key",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/org/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "org",
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Change its events, URL, enabled state or signing key.\n\nDocs: https://wpai.co.in/docs/webhooks",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"events\": [\n    \"message.inbound\",\n    \"message.status\",\n    \"template.status\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a webhook",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/org/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "org",
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "<id>"
                }
              ]
            },
            "description": "Delete a webhook.\n\nDocs: https://wpai.co.in/docs/webhooks"
          }
        }
      ]
    },
    {
      "name": "Website widget",
      "description": "Needs a widget-scoped key, not the server key. Override apiKey on this folder.",
      "item": [
        {
          "name": "Send a visitor message to the assistant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/public/chat/message",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "chat",
                "message"
              ]
            },
            "description": "Send a visitor message to the assistant.\n\nRequires the chat:write scope on a widget key.\n\nDocs: https://wpai.co.in/docs/widget",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"message\": \"Do you deliver to Bandra?\",\n  \"name\": \"Priya\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Read a widget session back",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/public/chat/history?sessionId={{sessionId}}&limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "chat",
                "history"
              ],
              "query": [
                {
                  "key": "sessionId",
                  "value": "{{sessionId}}"
                },
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": "Read a widget session back.\n\nRequires the chat:read scope on a widget key.\n\nDocs: https://wpai.co.in/docs/widget"
          }
        },
        {
          "name": "Reset a widget conversation",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/public/chat/session?sessionId={{sessionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "chat",
                "session"
              ],
              "query": [
                {
                  "key": "sessionId",
                  "value": "{{sessionId}}"
                }
              ]
            },
            "description": "Reset a widget conversation.\n\nRequires the chat:write scope on a widget key.\n\nDocs: https://wpai.co.in/docs/widget"
          }
        },
        {
          "name": "Bookable slots for a date",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/public/bookings/slots?date=2026-09-01",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "bookings",
                "slots"
              ],
              "query": [
                {
                  "key": "date",
                  "value": "2026-09-01"
                }
              ]
            },
            "description": "Bookable slots for a date.\n\nRequires the bookings:read scope on a widget key.\n\nDocs: https://wpai.co.in/docs/widget"
          }
        },
        {
          "name": "Create a booking from a website form",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/public/bookings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "bookings"
              ]
            },
            "description": "Create a booking from a website form.\n\nRequires the bookings:write scope on a widget key.\n\nDocs: https://wpai.co.in/docs/widget",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Priya Sharma\",\n  \"phone\": \"919876543210\",\n  \"date\": \"2026-09-01\",\n  \"time\": \"14:30\",\n  \"service\": \"Consultation\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}
