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
Name | In | Description | Required | Type | Example |
---|
apikey | header | Your account API key | true | string | 2xxc4x4xx2c94xxxc2f9xx9d43xxxx8a |
Name | Type | Description | Required | Example |
---|
source | string | Sender WhatsApp Number | true | 919163xxxxx3 |
src.name | string | App name that the source number belongs to | true | DemoApp |
destination | string | Receiver WhatsApp Number | true | 917839xxxxx3 |
template | object | Contains template ID and list of template parameters | true | |
channel | string | Messaging Platform Name | true | whatsapp |
Name | Type | Description | Required | Example |
---|
id | string | Template ID | true | "template_id" |
params | array | List of template parameters; should also contain the thumbnail_product_retailer_id as the last parameter | true | ["hi","di3i7rs6js"] |
Status Code | Description | Response Schema |
---|
200 | Success response | { "status": "success", "messageId": "message id" } |
400 | Error response; in case of bad request | { "status": "error", "message": "Invalid Destination" } |
401 | Error response; in case of authentication failure | { "status": "error", "message": "Authentication Failed" } |