Guides

Moving from AiSensy

QMessage accepts the same request fields as AiSensy’s API campaigns. In most cases your software needs only a new address and a new API key.

Steps

  1. 1

    Check your templates

    Make sure the templates your software uses are approved on the WhatsApp number connected to QMessage. You see them in QMessage under Templates.
  2. 2

    Create the same API campaigns

    In Campaigns → API campaigns, create one for each AiSensy API campaign, with the same name and template. Then campaignName doesn’t change.
  3. 3

    Create an API key

    In Manage → API keys. It replaces your AiSensy API key.
  4. 4

    Change the address and the key

    Send requests to https://qmessage.gatiq.in/api/v1/send with the new key. You can keep the key in apiKey in the body, but we recommend the Authorization header.
  5. 5

    Test with dryRun

    Add "dryRun": true to a real request. QMessage checks it and shows the final message without sending. Remove it when all is well.

Field by field

AiSensy fieldIn QMessage
apiKeyWorks. Use your QMessage key. The Authorization header works too.
campaignNameWorks. Must match a live QMessage API campaign. Capital letters don’t matter.
destinationWorks. A 10-digit number is taken as Indian, as on AiSensy.
userNameWorks. Optional in QMessage.
templateParamsWorks. The count must match the template, as on AiSensy.
paramsFallbackValueWorks. See paramsFallbackValue.
mediaWorks (url and filename).
locationWorks.
buttonsWorks for website link and copy-code buttons.
carouselCardsWorks. Card files must be https links.
tagsWorks. New tags are created instead of being ignored.
attributesWorks. New fields are created instead of being ignored.
sourceWorks. Saved as the contact field source.

The same request works on both. Only the address and key change:

curl -X POST https://qmessage.gatiq.in/api/v1/send \
  -H "Authorization: Bearer $QMESSAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_QMESSAGE_API_KEY",
    "campaignName": "order_update",
    "destination": "919876543210",
    "userName": "Priya Sharma",
    "source": "Website order",
    "templateParams": [
      "Priya",
      "#10234",
      "Friday"
    ],
    "tags": [
      "customer"
    ],
    "attributes": {
      "city": "Jaipur"
    }
  }'

What’s different

  • Answers: QMessage answers with a status code and a clear error when something is wrong, and with messageId when it works. If your software only checks for status 200, nothing changes. See Responses and errors.
  • More template types: text header values, copy-code buttons, limited-time offers and one-time codes have their own simple fields. See Examples by template.
  • Opted-out customers don’t get marketing messages. The request is refused with status 409.
  • Speed: up to 20 requests a second per key.

Coming soon

Webhooks for delivered, read and reply events. Until then, delivery and read status is shown in QMessage.
QMessage is a product of GatiQ Platforms LLP. Questions about the API? Write to qmessage@gatiq.in.