Reference
Examples by template
A ready request for each kind of template. Replace the campaign name and values with your own. Each API campaign’s page in QMessage also shows the exact request for its template.
Text with values
The template text and the values your software sends:
Hi {{1}}, your order {{2}} is packed and will arrive on {{3}}.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"
]
}'A template with no values needs only the campaign name and the number.
Image, video or PDF at the top
Send the file as a public https:// link. For a PDF, filename is the name shown on the phone. Leave media out to use the API campaign’s default file.
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "invoice_ready",
"destination": "919876543210",
"templateParams": [
"Priya",
"INV-2026-0412"
],
"media": {
"url": "https://example.com/invoices/INV-2026-0412.pdf",
"filename": "Invoice INV-2026-0412.pdf"
}
}'Tip
Text header with a value
Header: Order {{1}} shipped
Body: Hi {{1}}, track your parcel with the button below.curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "order_shipped",
"destination": "919876543210",
"headerParams": [
"#10234"
],
"templateParams": [
"Priya"
]
}'Website button with a link per customer
For a button whose link ends in {{1}}, send the end of the link by the button’s position. The first button is 0.
Track order → https://shop.example.com/track/{{1}}curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "order_shipped",
"destination": "919876543210",
"templateParams": [
"Priya"
],
"buttonParams": {
"0": "A1234"
}
}'Copy offer code
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "festive_offer",
"destination": "919876543210",
"templateParams": [
"Priya",
"20%"
],
"couponCode": "DIWALI20"
}'Limited-time offer
Send when the offer ends. The customer sees a countdown. If the template has a copy-code button, send the code too.
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "flash_sale",
"destination": "919876543210",
"templateParams": [
"Priya"
],
"offerExpiresAt": "2026-12-31T23:59:59+05:30",
"couponCode": "FLASH50"
}'Location at the top
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "visit_store",
"destination": "919876543210",
"templateParams": [
"Priya"
],
"location": {
"latitude": 26.9124,
"longitude": 75.7873,
"name": "Example Store",
"address": "MI Road, Jaipur, Rajasthan"
}
}'One-time code (authentication)
Send only the code. WhatsApp writes the message text itself and adds the copy button.
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "login_code",
"destination": "919876543210",
"otp": "482913"
}'Important
Carousel
One entry per card, in the same order as the template. Each card can have its own file, values and link ending.
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "new_arrivals",
"destination": "919876543210",
"templateParams": [
"Priya"
],
"cards": [
{
"media": {
"url": "https://example.com/img/kurta.jpg"
},
"templateParams": [
"Cotton kurta",
"₹799"
],
"buttonParams": {
"0": "kurta-101"
}
},
{
"media": {
"url": "https://example.com/img/saree.jpg"
},
"templateParams": [
"Silk saree",
"₹2,499"
],
"buttonParams": {
"0": "saree-205"
}
}
]
}'The same carousel in WhatsApp’s own card format (as AiSensy accepts it) also works:
curl -X POST https://qmessage.gatiq.in/api/v1/send \
-H "Authorization: Bearer $QMESSAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaignName": "new_arrivals",
"destination": "919876543210",
"templateParams": [
"Priya"
],
"carouselCards": [
{
"card_index": 0,
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://example.com/img/kurta.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Cotton kurta"
},
{
"type": "text",
"text": "₹799"
}
]
},
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "kurta-101"
}
]
}
]
},
{
"card_index": 1,
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://example.com/img/saree.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Silk saree"
},
{
"type": "text",
"text": "₹2,499"
}
]
},
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "saree-205"
}
]
}
]
}
]
}'Check without sending
Add dryRun: true to any request. QMessage runs every check and returns the finished message, but sends nothing and charges nothing. Useful while you build your integration.
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",
"templateParams": [
"Priya",
"#10234",
"Friday"
],
"dryRun": true
}'