Engati - User Guide
...
Simplified Broadcast
Template Message

Generate API for WhatsApp Templates

5min

The Generate API creates a cURL command with your template details that you can execute to send messages. You can integrate this into any external system or process that supports making API calls.

Instead of only sending through Engati's dashboard, developers can build customized tools for managing templates at scale. The automation capabilities open many possibilities to connect messaging to external workflows.

Availability

It is available for Shopify and Non-shopify accounts with the selected WhatsApp provider as 360dialog.

Setting Up

For setting up your WhatsApp Template using API, follow the steps mentioned below:

Generating cURL from Engati Portal

Step 1 : Navigate to Broadcast > Message Templates > More Actions > Generate cURL Note: This is available only for the approved templates.

Document image


Step 2 : After clicking the ‘Generate cURL’ option an API request box will be displayed.

Document image


Step 4 : Click on ‘Copy’ to save the API request in your clipboard. It can then be used on postman or shared with your technical team.

Importing cURL on Postman

Step 1 : Once the cURL is copied, open POSTMAN on your system.

Document image


Step 2 : Click the ‘import’ button in the ‘My Workspace’ section

Document image


Step 3 : Paste the cURL copied from the Engati portal into the text box.

Document image


Step 4 : Once you paste the cURL into the text box, click on the ‘Continue’ button.

Step 5 : Click on the ‘Send’ button once you verify the cURL file details.

Document image


Step 6 : Make sure you replace the following parameters before making the API call from your external system -

  • phoneNumber(mandatory) - Add the phone number of the recipient
  • "payload": "flow_<flow_key>"(for quick reply buttons) : Replace the flow key of the path. Click here for more details
  • "filename"(for pdf files) : Name of the file being sent
  • "link"(for pdf and image files) : URL link of the file
  • "text"(for parameter values) : Replace text values for parameters in the template

This is how you can generate APIs for WhatsApp Templates as it provides the flexibility to use WhatsApp templates in a programmatic, integrated manner. You gain more control and customization for your messaging operations.

If you face any issues or queries please reach out to us at [email protected]