Guide FloatChat

Floatchat- User Guid

External Broadcast API

1. Introduction #

This feature enables you to initiate a broadcast from outside the Floatchat platform for a group of users at once. It eliminates the need to use the API to send a template message to each user individually.

2. Availability #

This feature is available only if you have WhatsApp enabled in your Floatchat account and 360Dialog as your provider. It is accessible with the higher-tier Floatchat plans.

The API allows you to send broadcasts using WhatsApp template messages exclusively.

3. Basic Usage #

HTTP Method: Post

Request URL: https://api.floatchat.ai/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 containing the list of recipients

template_payload: Message structure to be sent, along with parameters

Sample cURL:

4. CSV File structure: #

CSV File structure (1)

The broadcast’s status will be either “In-progress” or “Completed.” However, the status will not refresh automatically. To manually refresh the status, click on the “…” options beside the status and select “Update Status.”

4.1 Column Headers #

Since a phone number is mandatory when using WhatsApp as the channel, the first column header must always be user.phone_number. Additionally, there will be as many column headers as there are attributes, following this format:

user.attribute_N, where N starts with 0 (e.g., user.attribute_0, user.attribute_1, and so on).

4.2 Phone Number #

To ensure the phone number is in the correct format, add “+ ” in front of the phone number with the country code.

4.3 Response Codes #

Some common response codes from the API include:

1000, “SUCCESS”: Broadcast sent successfully

2000, “FAILURE”: Unhandled error occurred

2003, “BOT_NOT_FOUND”: Bot key does not match any Floatchat bot

2004, “API_KEY_NOT_FOUND”: 360Dialog is not properly configured

2005, “INVALID_FILE_FORMAT”: Customer did not upload a CSV file

2006, “FILE_UPLOAD_FAILED”: Error occurred while uploading CSV file or the file is too large

5.Broadcast Status #

Once an external broadcast is triggered, it will appear under Broadcast > Basic Broadcast > Published, marked with the tag “(Ext.)” to indicate that it is an external broadcast triggered using our API.

Broadcast Status (1)

The broadcast’s status will be either “In-progress” or “Completed.” However, the status will not refresh automatically. To manually refresh the status, click on the “…” options beside the status and select “Update Status.”

What are your feelings
Scroll to Top