Engati Product Docs

⌘K
Engati - User Guide
Getting started with Engati
Building your bot
Harnessing conversational intelligence
Deploying the bot
Broadcasts
Tracking & Analytics
Activating Live Chat
Managing your account
Engati for Shopify - What’s in it for you?
Engati APIs
What's New?
Docs powered by archbee 
9min

External Broadcast API

1. Introduction

This feature allows you to trigger a broadcast from outside the engati platform for a list of users in one go. This avoids using the API to send a template message one user at a time.

2. Availability

This feature is available only if WhatsApp is enabled in your account with 360Dialog as your provider. This feature is available with the higher engati plans.

The API can be used to send broadcast with WhatsApp template messages only.

3. Basic Usage

HTTP Method: Post

Request URL: https://api.engati.com/whatsapp-api/v1.0/customer/<customer id>/bot/<bot key>/external/broadcast?broadcast_id=<broadcast name>

Headers:

Authorization: Basic <Auth Token>

Body:

target_audience: CSV file with list of receipients

template_payload: Structure of message to be sent along with parameters

Sample Curl:

Curl
|

4. CSV File structure

Document image

While the template_payload is the signature of the template message to be sent, the CSV file contains the values of the parameters included in the template message for all the users in the target_audience

4.1 Column Headers

Since a phone number is mandatory with WhatsApp as the channel, the first column header will always be user.phone_number.

Besides user.phone_number, there will be as many column headers as there are attributes. These will have the format:

user.attribute_N where N starts with 0, so user.attribute_0, user.attribute_1 and so on

4.2 Phone Number

To ensure that the phone number is in the right format, a "+ " should be added in front of the phone number with the country code.

4.3 Response Codes

Some of the common response codes from the API include:

1000, "SUCCESS": Success

2000, "FAILURE" : Unhandled Error

2003, "BOT_NOT_FOUND" : botkey does not match any engati bot

2004, "API_KEY_NOT_FOUND" : 360dialog not properly configured

2005, "INVALID_FILE_FORMAT" : customer does not upload a CSV file

2006, "FILE_UPLOAD_FAILED" : error in uploading CSV file or file is too large

5. Broadcast Status

Once an external broadcast has been triggered, it shows up in Broadcast > Basic Broadcast > Published with the tag (Ext.) highlighting that this broadcast is an external broadcast triggered using our API.

Document image

The status of the broadcast will either be In-progress or Completed. The status will however not be auto-refresh. The status can be manuall refreshed by clicking on the "..." options to the right of status and clicking "Update Status"



Updated 19 Aug 2022
Did this page help you?
Yes
No
UP NEXT
Tracking & Analytics
Docs powered by archbee 
TABLE OF CONTENTS
1. Introduction
2. Availability
3. Basic Usage
4. CSV File structure
4.1 Column Headers
4.2 Phone Number
4.3 Response Codes
5. Broadcast Status