{"info":{"name":"Wamafy API","description":"Docs: https://wamafy.com/developers. Set the apiKey variable to your key before sending.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{apiKey}}","type":"string"}]},"variable":[{"key":"baseUrl","value":"https://api.wamafy.com/api/v1/public"},{"key":"apiKey","value":""}],"item":[{"name":"Messages","description":"Send templates at any time, reply freely inside the 24-hour window, and check what happened to a message.","item":[{"name":"Send a template message","request":{"method":"POST","description":"Sends one approved template. This is the message to use when you start the conversation: an order update, an OTP, a reminder. Outside the 24-hour window it is the only kind WhatsApp will deliver (see [The 24-hour window](/developers/guides/messaging-window)).\n\nGet the template names and the variables each expects from [List templates](/developers/api/list-templates).","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/messages","host":["{{baseUrl}}"],"path":["messages"]},"body":{"mode":"raw","raw":"{\n  \"to\": \"+919876543210\",\n  \"templateName\": \"order_update\",\n  \"variables\": {\n    \"1\": \"Priya\",\n    \"2\": \"#1043\"\n  }\n}","options":{"raw":{"language":"json"}}}}},{"name":"Get message status","request":{"method":"GET","description":"Returns where a message has got to, with the time of each step. Works for templates sent through this API and for replies sent inside the 24-hour window, whether they came from the API, the inbox or a chatbot. Broadcast and drip messages are reported in the dashboard, not here.\n\nIf you would rather be told than ask, register a [status webhook](/developers/webhooks/status) and the same changes are pushed to you.","header":[],"url":{"raw":"{{baseUrl}}/messages/wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQzU","host":["{{baseUrl}}"],"path":["messages","wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQzU"]}}},{"name":"Check the reply window","request":{"method":"GET","description":"Tells you if the 24-hour window is open for a contact, and when it closes. Use it to decide between a free-form reply and a template. See [The 24-hour window](/developers/guides/messaging-window).","header":[],"url":{"raw":"{{baseUrl}}/window?to=%2B919876543210","host":["{{baseUrl}}"],"path":["window"],"query":[{"key":"to","value":"+919876543210"}]}}},{"name":"Send a text message","request":{"method":"POST","description":"Sends a free-form text reply. Only works while the person's 24-hour window is open, meaning they messaged you in the last 24 hours. Otherwise send a template.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/messages/text","host":["{{baseUrl}}"],"path":["messages","text"]},"body":{"mode":"raw","raw":"{\n  \"to\": \"+919876543210\",\n  \"text\": \"Yes, the blue one is in stock. Shall I keep it aside for you?\"\n}","options":{"raw":{"language":"json"}}}}},{"name":"Send buttons or a list","request":{"method":"POST","description":"Sends a message the person answers by tapping: up to three reply buttons, or a list menu. Pass `buttons` or `list`, not both. Only works inside the 24-hour window.\n\nTheir choice comes back on the [message.inbound](/developers/webhooks/events) webhook, with the `id` you gave the button or row in `interactiveReplyId`.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/messages/interactive","host":["{{baseUrl}}"],"path":["messages","interactive"]},"body":{"mode":"raw","raw":"{\n  \"to\": \"+919876543210\",\n  \"body\": \"When should we deliver?\",\n  \"buttons\": [\n    {\n      \"id\": \"today\",\n      \"title\": \"Today\"\n    },\n    {\n      \"id\": \"tomorrow\",\n      \"title\": \"Tomorrow\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}}}},{"name":"Send a file","request":{"method":"POST","description":"Sends a file up to 16 MB. Give either a public `link` we fetch, or a `mediaHandle` from [Upload a file](/developers/api/upload-media). Only works inside the 24-hour window.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/messages/media","host":["{{baseUrl}}"],"path":["messages","media"]},"body":{"mode":"raw","raw":"{\n  \"to\": \"+919876543210\",\n  \"link\": \"https://wamafy.com/smoke/sample.pdf\",\n  \"caption\": \"Your invoice\",\n  \"filename\": \"INV-1043.pdf\"\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Templates","description":"The pre-approved messages you send to start a conversation.","item":[{"name":"List templates","request":{"method":"GET","description":"Returns your approved templates. Each one lists the variables to fill in and its buttons, so you know exactly what [Send a template message](/developers/api/send-template) expects.","header":[],"url":{"raw":"{{baseUrl}}/templates","host":["{{baseUrl}}"],"path":["templates"]}}},{"name":"Create a template","request":{"method":"POST","description":"Creates a template and submits it to Meta for review. Most are approved within minutes. Check with [List templates](/developers/api/list-templates) and `status=all` until it shows `APPROVED`.\n\nThe fields below are for a standard template. Carousel, catalog, product and limited-time offer templates are easier to build in the dashboard.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/templates","host":["{{baseUrl}}"],"path":["templates"]},"body":{"mode":"raw","raw":"{\n  \"variant\": \"STANDARD\",\n  \"name\": \"order_shipped\",\n  \"category\": \"UTILITY\",\n  \"language\": \"en\",\n  \"header\": {\n    \"type\": \"NONE\"\n  },\n  \"body\": \"Hi {{1}}, your order {{2}} has shipped.\",\n  \"bodyExamples\": [\n    \"Priya\",\n    \"#1043\"\n  ]\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Media","description":"Upload files to send as messages or template headers.","item":[{"name":"Upload a file","request":{"method":"POST","description":"Uploads a file and returns a `mediaHandle` to pass to [Send a file](/developers/api/send-media) or to a template's media header. Send it as `multipart/form-data` with the file in a field called `file`.\n\nAccepted: JPEG and PNG images, MP4 and 3GP video, audio, PDF and common office documents.","header":[],"url":{"raw":"{{baseUrl}}/media","host":["{{baseUrl}}"],"path":["media"]},"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"invoice.pdf"}]}}}]},{"name":"Contacts","description":"Keep your customer list in step with your own system. The phone number is the key.","item":[{"name":"List contacts","request":{"method":"GET","description":"Returns your contacts, newest first, a page at a time.","header":[],"url":{"raw":"{{baseUrl}}/contacts?tag=vip&limit=50","host":["{{baseUrl}}"],"path":["contacts"],"query":[{"key":"tag","value":"vip"},{"key":"limit","value":"50"}]}}},{"name":"Get a contact","request":{"method":"GET","description":"Returns one contact.","header":[],"url":{"raw":"{{baseUrl}}/contacts/919876543210","host":["{{baseUrl}}"],"path":["contacts","919876543210"]}}},{"name":"Create or update a contact","request":{"method":"POST","description":"Creates the contact, or updates it when one with this phone number already exists. Phone is the key, so you can call this every time something changes on your side without checking first.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/contacts","host":["{{baseUrl}}"],"path":["contacts"]},"body":{"mode":"raw","raw":"{\n  \"phone\": \"+919876543210\",\n  \"firstName\": \"Priya\",\n  \"lastName\": \"Sharma\",\n  \"tags\": [\n    \"vip\"\n  ],\n  \"customFields\": {\n    \"city\": \"Mumbai\"\n  }\n}","options":{"raw":{"language":"json"}}}}},{"name":"Update a contact","request":{"method":"PATCH","description":"Updates only the fields you send. `customFields` is merged key by key, so `{ \"customFields\": { \"city\": \"Pune\" } }` changes the city and leaves your other attributes alone.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/contacts/919876543210","host":["{{baseUrl}}"],"path":["contacts","919876543210"]},"body":{"mode":"raw","raw":"{\n  \"tags\": [\n    \"vip\",\n    \"repeat\"\n  ],\n  \"customFields\": {\n    \"city\": \"Pune\"\n  }\n}","options":{"raw":{"language":"json"}}}}},{"name":"Opt a contact out","request":{"method":"POST","description":"Marks the contact as opted out. Broadcasts and other marketing sends skip them from then on.","header":[],"url":{"raw":"{{baseUrl}}/contacts/919876543210/opt-out","host":["{{baseUrl}}"],"path":["contacts","919876543210","opt-out"]}}},{"name":"Opt a contact in","request":{"method":"POST","description":"Sets the contact's consent to `opted_in`.\n\nAn opt-out is final here: a contact who opted out cannot be opted back in over the API. They have to opt in again themselves, for example by messaging you.","header":[],"url":{"raw":"{{baseUrl}}/contacts/919876543210/opt-in","host":["{{baseUrl}}"],"path":["contacts","919876543210","opt-in"]}}},{"name":"List a contact's messages","request":{"method":"GET","description":"Returns messages to and from a contact, newest first. To page back, pass the `nextBefore` value from the last response as `before`.","header":[],"url":{"raw":"{{baseUrl}}/contacts/919876543210/messages?limit=20","host":["{{baseUrl}}"],"path":["contacts","919876543210","messages"],"query":[{"key":"limit","value":"20"}]}}},{"name":"Start a chatbot for a contact","request":{"method":"POST","description":"Starts a published chatbot for this contact, as if they had triggered it. Anything in `variables` is available in the chatbot as `{{name}}`.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/contacts/919876543210/trigger-flow","host":["{{baseUrl}}"],"path":["contacts","919876543210","trigger-flow"]},"body":{"mode":"raw","raw":"{\n  \"flowId\": \"7a1b3c5d-2e4f-4a6b-8c0d-1e3f5a7b9c2d\",\n  \"variables\": {\n    \"order_id\": \"#1043\"\n  }\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Segments","description":"Saved audiences built in the dashboard, read over the API.","item":[{"name":"List segments","request":{"method":"GET","description":"Returns your saved segments. A segment is a set of rules (tagged `vip` and ordered twice, say) that is checked again each time it is used. Build them in the dashboard; the API reads them.","header":[],"url":{"raw":"{{baseUrl}}/segments","host":["{{baseUrl}}"],"path":["segments"]}}},{"name":"List segment contacts","request":{"method":"GET","description":"Works out the segment's members at the moment you call, and returns them a page at a time.\n\nTo message everyone in a segment you do not need this: pass `segmentId` to [Start a campaign](/developers/api/start-campaign) and it is done in one call.","header":[],"url":{"raw":"{{baseUrl}}/segments/0f2c8a1e-6b3d-4c9a-8e2f-5d7b1a3c9e40/contacts?limit=500","host":["{{baseUrl}}"],"path":["segments","0f2c8a1e-6b3d-4c9a-8e2f-5d7b1a3c9e40","contacts"],"query":[{"key":"limit","value":"500"}]}}}]},{"name":"Campaigns","description":"Send one template to many people in a single call, now or later, and follow how it goes.","item":[{"name":"Start a campaign","request":{"method":"POST","description":"Creates a broadcast and starts it straight away, or at `scheduledAt`. Sending carries on in the background; follow it with [Get a campaign](/developers/api/get-campaign) or under Campaigns in the dashboard.\n\nPick the audience with `segmentId` or `tags`. With neither, it goes to every active contact.","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/campaigns","host":["{{baseUrl}}"],"path":["campaigns"]},"body":{"mode":"raw","raw":"{\n  \"templateName\": \"diwali_offer\",\n  \"segmentId\": \"0f2c8a1e-6b3d-4c9a-8e2f-5d7b1a3c9e40\",\n  \"variables\": {\n    \"1\": \"friend\"\n  },\n  \"name\": \"Diwali VIP\"\n}","options":{"raw":{"language":"json"}}}}},{"name":"Get a campaign","request":{"method":"GET","description":"Returns a broadcast you started with [Start a campaign](/developers/api/start-campaign): whether it is scheduled, sending or done, and where its recipients have got to.\n\nThe counts only ever narrow: every delivered message was sent, and every read one was delivered, even when WhatsApp never sent the delivered receipt.","header":[],"url":{"raw":"{{baseUrl}}/campaigns/3c5e7a9b-1d2f-4a6c-8e0b-2d4f6a8c0e13","host":["{{baseUrl}}"],"path":["campaigns","3c5e7a9b-1d2f-4a6c-8e0b-2d4f6a8c0e13"]}}}]},{"name":"Payments","description":"Ask for a payment the customer makes inside WhatsApp, and see when it is paid.","item":[{"name":"Ask for a payment","request":{"method":"POST","description":"Sends WhatsApp's own payment request, Review and pay. The customer pays without leaving WhatsApp, with Google Pay, PhonePe or any UPI app, and the money goes to your own payment gateway.\n\nIf the customer wrote to you in the last 24 hours, the request goes as a message and needs no template. Otherwise WhatsApp only allows a template, so name one in `templateName`: a Utility template with a Review and pay button, created in the dashboard. Pass `templateName` every time and it is used only when needed. See [The 24-hour window](/developers/guides/messaging-window).\n\nFirst, switch on Payments within WhatsApp for the number in the dashboard (Settings, Integrations, Payments). Follow the payment with [Get a payment](/developers/api/get-payment).","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/payments","host":["{{baseUrl}}"],"path":["payments"]},"body":{"mode":"raw","raw":"{\n  \"to\": \"+919876543210\",\n  \"amount\": 499,\n  \"description\": \"Order 1042\",\n  \"message\": \"Your order is packed and ready to go.\"\n}","options":{"raw":{"language":"json"}}}}},{"name":"Get a payment","request":{"method":"GET","description":"Reads back a payment asked for with [Ask for a payment](/developers/api/request-payment), with any refunds made on it. To be told instead of asking, use the [payment.paid](/developers/webhooks/events) webhook.","header":[],"url":{"raw":"{{baseUrl}}/payments/5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d24","host":["{{baseUrl}}"],"path":["payments","5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d24"]}}}]},{"name":"Analytics","description":"Message totals for reporting.","item":[{"name":"Get message stats","request":{"method":"GET","description":"Returns message totals for a period and a per-day count, in your workspace's time zone, the same figures as the dashboard.","header":[],"url":{"raw":"{{baseUrl}}/analytics?from=2026-09-01T00%3A00%3A00Z&to=2026-10-01T00%3A00%3A00Z","host":["{{baseUrl}}"],"path":["analytics"],"query":[{"key":"from","value":"2026-09-01T00:00:00Z"},{"key":"to","value":"2026-10-01T00:00:00Z"}]}}}]}]}