URL: https://app.quickreply.ai/api/whatsapp/send-template?templateId={template_id}
Method: POST
Headers client-id: {client_id} secret-key: {secret_key} Content-Type: application/json
Body:
{
"to": "{{recipient_phone in international format}}",
"name": "{{recipient_name}}",
"email": "{{recipient_email}}",
"link": "{{media_url}}",
"params": [ {{params}} ],
"button_params": [ {{button_params}} ],
"hook_with_playbook":"{{playbook_id}}"
}'
Parameter | Explanation |
template_id | id of template message. you can get it from Templates tab |
client-id | client id of your account. You can get it from settings -> API credentials |
client-secret | client secret key of your account. You can get it from settings -> API credentials |
to | receivers phone number in international format (eg +919876543210 ) |
name (optional) | name of receiver. If supplied, it will be displayed on your account next to phone number |
email (optional) | email of receiver. If supplied, it will be displayed on your account next to phone number |
link (required for media template only) | link to media, if you supplied media template. Link should be a direct link, not google drive or any website's link. Media type should match with the template. For example if template requires video, the link should point to a valid video |
params (required only if template has variables) | Array of parameters for the template body. It should match with the number of parameters required in the template. For example if template body contains 2 parameters: {{1}} and {{2}} then you need to supply array of 2 strings. |
button_params (required only if template has dynamic link as cta button) | If link in the template was dynamic, you need to supply dynamic part of the URL as a button_params |
playbook_id (required only if template has quick reply buttons) | id of playbook(chatbot), if template has quickreply buttons to start chatbot. playbook_id can be found from AI builder. |