Catalog

cURL

curl --location '{{api_front_base_url}}/wa/api/v1/raw/msg' \
--header 'apikey: {{apiKey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'channel=whatsapp' \
--data-urlencode 'source={{source phone number}}' \
--data-urlencode 'destination={{destination phone number}}' \
--data-urlencode 'src.name={{app_name}}' \
--data-urlencode 'template={"id":"<template_id>","params":[<list_of_template_parameters>]}'

📘

  • Sending MPM templates not supported via Gupshup UI.
  • The template.params list must include the thumbnail product retailer id as the last parameter

Request Parameters

NameInDescriptionRequiredTypeExample
apikeyheaderYour account API keytruestring2xxc4x4xx2c94xxxc2f9xx9d43xxxx8a

Form Parameters

NameTypeDescriptionRequiredExample
sourcestringSender WhatsApp Numbertrue919163xxxxx3
src.namestringApp name that the source number belongs totrueDemoApp
destinationstringReceiver WhatsApp Numbertrue917839xxxxx3
templateobjectContains template ID and list of template parameterstrue
channelstringMessaging Platform Nametruewhatsapp

Template Object

NameTypeDescriptionRequiredExample
idstringTemplate IDtrue"template_id"
paramsarrayList of template parameters; should also contain the thumbnail_product_retailer_id as the last parametertrue["hi","di3i7rs6js"]

Status Codes

Status CodeDescriptionResponse Schema
200Success response{ "status": "success", "messageId": "message id" }
400Error response; in case of bad request{ "status": "error", "message": "Invalid Destination" }
401Error response; in case of authentication failure{ "status": "error", "message": "Authentication Failed" }
Language
Click Try It! to start a request and see the response here!