Get started
API campaigns
An API campaign links a name to one approved template. Your software only sends the name and the values. Which template is used, and any default files, are set in QMessage.
Create an API campaign
- 1
Open Campaigns → API campaigns
In the project with your WhatsApp number. - 2
Click New API campaign
Give it a name, for exampleorder_update. Use letters, numbers, spaces,-,_and., up to 60 characters. Your software sends this name incampaignName. Capital letters don’t matter. - 3
Choose the template
Pick one of your approved templates. The list shows only templates the API can send. - 4
Set defaults (if the template needs them)
For a template with an image, video or PDF at the top, you can set a default file. For a location template, a default location. For a carousel, a default file for each card. A request can still send its own; the default is used when it doesn’t.
A new API campaign is live straight away. Its page shows the exact request your software should send, ready to copy.
Send a test
On the API campaign’s page, click Send a test. Enter your own WhatsApp number and the values, and QMessage sends the real message. You can also just check the values without sending, which works like dryRun.
Pause, rename or delete
- Pause: requests for a paused campaign are refused (status 409) until you resume it. Nothing is sent.
- Rename: software still using the old name stops working. Change the name in your software at the same time.
- Delete: requests with its name get status 404. Messages already sent stay in Live Chat and History.
See the results
Each API campaign has its own page with numbers for the last 7, 30 or 90 days:
| Number | What it counts |
|---|---|
| Sent | Messages WhatsApp accepted |
| Delivered | Messages that reached the customer’s phone |
| Read | Messages the customer opened (only if they have read receipts on) |
| Replied | Customers who wrote back |
| Failed | Messages WhatsApp couldn’t deliver, for example to a number that isn’t on WhatsApp |
| Rejected calls | Requests QMessage refused before sending: wrong values, unknown number, paused campaign… |
Below the numbers you can search every message sent by the campaign and every request your software made, with its error if it failed.
Which templates work
The API sends every kind of approved template, except:
- catalog and product templates (single product, multi-product, catalog)
- templates with a voice call, payment request or order details button
- carousels with a card type other than image or video
Important