curl --location '{{api_front_base_url}}/wa/api/v1/template/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>]}'
📘
- The
template.params
list should include the verification code twice, for the body and button component.
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 (only parameter is the verification code) | 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 (Verification code should be present twice, for the body and button component) | true | ["1234","1234"] |
Status Code | Description | Response Schema |
---|
202 | 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" } |