QMessage API

Send WhatsApp messages from your own software

Your website, CRM, shop or billing system can send WhatsApp messages through QMessage: an order confirmation, a payment reminder, a login code or an offer. Each message uses one of your approved WhatsApp templates and goes out from your business number.

How it works

  1. 1

    Create an API key

    In your QMessage project, open Manage → API keys and create a key. Your software sends it with every request. See API keys.
  2. 2

    Create an API campaign

    In Campaigns → API campaigns, give the campaign a name and choose the approved template it sends. See API campaigns.
  3. 3

    Call the API

    Send the campaign name, the customer’s number and the values for the template. QMessage fills in the template and sends it on WhatsApp. See Send a message.

Quick start

One request sends one message to one person. This sends the API campaign “order_update” to +91 98765 43210:

POSThttps://qmessage.gatiq.in/api/v1/send
curl -X POST https://qmessage.gatiq.in/api/v1/send \
  -H "Authorization: Bearer $QMESSAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignName": "order_update",
    "destination": "919876543210",
    "userName": "Priya Sharma",
    "templateParams": [
      "Priya",
      "#10234",
      "Friday"
    ]
  }'

If WhatsApp accepts the message, you get back:

200 OK
{
  "success": true,
  "messageId": "6f1c2a9e-0d3b-4c71-9a55-2b7d8e4f1c20",
  "waMessageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQ0Y3",
  "contactId": "c2b1f0e4-7a8d-4e2b-b1c3-5d6e7f8a9b0c",
  "status": "sent"
}

The message then shows up in your QMessage Live Chat and History, and in the API campaign’s results. If the customer replies, the reply arrives in Live Chat like any other chat.

Before you start

  • Your WhatsApp number is connected to the QMessage project.
  • The template you want to send is approved by WhatsApp. You can create templates in QMessage under Templates.
  • The API is turned on in your QMessage plan. If it isn’t, requests are refused with status 403. Write to us to turn it on.
  • Your message wallet has money in it. Each message is charged when WhatsApp delivers it.

What you can send

Any approved template, with everything it needs filled in by your software:

  • Text templates with values like the customer’s name or order number
  • An image, video or PDF at the top (for example an invoice PDF)
  • Website buttons with a link made for each customer, and “Copy offer code” buttons
  • Limited-time offers, a location at the top, and image or video carousels
  • One-time login codes (authentication templates)

See Examples by template for a ready request for each kind.

Coming soon

Webhooks that tell your software when a message is delivered or read, and when a customer replies. Until then you can see every message’s status in QMessage.

Where next

QMessage is a product of GatiQ Platforms LLP. Questions about the API? Write to qmessage@gatiq.in.