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. 1

    Open Campaigns → API campaigns

    In the project with your WhatsApp number.
  2. 2

    Click New API campaign

    Give it a name, for example order_update. Use letters, numbers, spaces, -, _ and ., up to 60 characters. Your software sends this name in campaignName. Capital letters don’t matter.
  3. 3

    Choose the template

    Pick one of your approved templates. The list shows only templates the API can send.
  4. 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:

NumberWhat it counts
SentMessages WhatsApp accepted
DeliveredMessages that reached the customer’s phone
ReadMessages the customer opened (only if they have read receipts on)
RepliedCustomers who wrote back
FailedMessages WhatsApp couldn’t deliver, for example to a number that isn’t on WhatsApp
Rejected callsRequests 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

If WhatsApp pauses or disables the template, or it’s deleted, requests for the campaign are refused (status 409) until you choose another template for it. QMessage checks the template on every request, so you’ll see the reason in the error.
QMessage is a product of GatiQ Platforms LLP. Questions about the API? Write to qmessage@gatiq.in.