Send Campaign

Prev Next
Post
/whatsapp/campaign

This API enables the sending of WhatsApp campaigns using pre-approved templates that do not include body parameters (header image, textual placeholders, etc.).
Request body parameters includes a CSV or Excel file with the target audience.

Note: The file must include a column named phone1, where all phone numbers are formatted with the full country code (e.g., 442079832100 for the UK).

Must include an approved template with the proper WhatsApp language code.

Security
HTTP
Type bearer

API key is needed to authorize requests. You can get your API key via the management console.
A Bearer Token is needed to be set in the Authorization header of every API call.
For additional support you can contact us.

Body parameters
object
Example{ "audience_file": "YXVkMS5jc3Y=", "notify_mail": "eddie.doe@commbox.io", "scheduled_date": "2025-01-22T11:15:55Z", "expiration_data": "2025-01-22T11:45:55Z", "template_name": "end_of_year_sale", "language_code": "en_uk", "campaign_name": "Sales_campaign", "audience_id": "NE_USA-above50", "stream_id": "1558" }
audience_file
string (binary)

The CSV or Excel file with the phone numbers.
Example:aud1.csv

notify_mail
string

The email address of the agent receiving the confirmation

scheduled_date
string (date-time)

(Optional) When left empty, campaign will be sent immediately. Use Unix format

expiration_data
string (date-time)

(Optional) The campaign end date and time. Use Unix format

save_as_new_audience
boolean

(Optional) When true, audience will be saved to the DB

Exampletrue
template_name
string

Template must be an approved template

language_code
string

Must use WA language code that match the template's language.
For example:en_uk

campaign_name
string

(Optional) Enter the title of the campaign

audience_id
string

(Optional) Add the title of existing audience from the DB for sending the campaign

stream_id
string

A CommBox generated number for the channel from which the campaign will be send

substream_id
string

(Optional) A CommBox generated number for the subchannel

automation_script_id
string

(Optional) Enter the script ID (flow) to which responding customers will be directed.
Navigate to Settings > Automation Flow module, and select the desired flow. The Id is listed under the flow's name after you select it

new_audience_name
string

(Optional) Name of the audience in the uploaded file

Responses
200

OK

object
status
string
Example200
description
string
ExampleCampaign created
response_time
string
Example2025-01-22T11:15:55.0822473Z
data
string
Example
400

Bad Request - The request could not be understood by the server. Incoming parameters might not be valid

401

Unauthorized - The supplied credentials, if any, are not sufficient to access the resource

404

Not found - The requested resource is not found

429

Too Many Requests - Too many requests have been made in a short period of time (Throttling)

500

Server Error - The server could not return the representation due to an internal server error

501

Not Implemented - The requested operation is not supported