How to send WhatsApp message using REST API - QuickReply.ai

How to send WhatsApp message using REST API - QuickReply.ai

After your account on QuickReply.ai is active, you can send template message to users.

Below are the details of REST API
  1. URL: https://app.quickreply.ai/api/whatsapp/send-template?templateId={template_id}

  2. Method: POST

  3. Headers client-id: {client_id} secret-key: {secret_key} Content-Type: application/json

  4. 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}}"

    }'

Below is the explanation of each parameter (Please remove { } while making API calls)
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.


Sample curl request for template with dynamic URL as a cta button
  1. curl --location --request POST 'https://app.intelliticks.com/api/whatsapp/send-template?templateId=31fa9753-f4f9-48b9-a5b6-ef62cbdd8eeb' \
  2. --header 'client-id: <client id> \
  3. --header 'secret-key: <secret key> \
  4. --header 'Content-Type: application/json' \
  5. --data-raw '{
  6.    "to": "+911231231231",
  7.    "name": "Iticks",
  8.    "params": [
  9.        "param1",
  10.        "param2"
  11.    ],
  12.    "button_params": [
  13.        "param1"
  14.    ],
  15.    "link": "https://www.buildquickbots.com/whatsapp/media/sample/jpg/sample01.jpg"
  16. }'




    • Related Articles

    • How to Collect WhatsApp Business Opt-Ins for your Shopify Store?

      What is an opt-in? An opt-in is when your consumers provide you with their phone number and they agree to receive messages from your business via WhatsApp. Before you send a consumer an outbound WhatsApp message, you must first collect opt-ins. ...
    • How to connect QuickReply.ai with LeadSquared for WhatsApp automation

      You can use WhatsApp connector app available on LeadSquared. Configure the details given below to use QuickReply.ai to send messages to WhatsApp via LSQ workflow/automations.  URL: https://cloudfunc.intelliticks.com/api/leadsquared/whatsapp Username: ...
    • How can I send images as an album in WhatsApp Business API?

      When sending image as an album from the WhatsApp Business API, you will need to send at least 4 images in succession. If the user's conversation view is currently active when the images are received, then the album view is unavailable until the next ...
    • Message Template Guidelines

      Message templates are reviewed daily by a Meta team. You can expect a response within 48 hours, excluding weekends and holidays. Rejections If your message template(s) have been rejected, it may have been for one of the following reasons. Formatting ...
    • Can I reject or block incoming messages to my WhatsApp number on QuickReply.ai?

      Currently, it is not possible to block users from sending messages to your WhatsApp Business API powered WhatsApp number. WhatsApp is intended to facilitate conversations between end users and businesses, and allow you to seamlessly transition ...