This API sends a WhatsApp campaign using a pre-approved template.
The request uses multipart/form-data and can include an audience file (audience_file), one or more IDs of audiences already saved in CommBox (audience_id), or both.
The selected stream_id must belong to an active WhatsApp channel.
Audience file requirements:
The CSV or Excel file must contain a phone1 column. Phone numbers must include the full country code, for example 442079832100. There is a 10 MB file size limit.
Template requirements:
The template must be approved by WhatsApp, and language_code must exactly match the language configured for the template, for example en or en_US.
For templates with input parameters, all placeholders must have values. Separate the values with a semicolon ;
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.
(Optional) Enter the title of the campaign
The target audience file: .csv, .xls or .xlsx, up to 10 MB. Must contain a phone1 column with full country codes. Either audience_file or audience_id is required.
The numeric ids of audiences already saved in CommBox, separated by ;. Names and titles are not accepted. Every id must exist on the channel given in stream_id. Either audience_file or audience_id is required.
Example: 4471;4472
(Optional) When true, the uploaded audience_file is also saved as a reusable audience. Requires audience_file and new_audience_name. Defaults to false.
Required when save_as_new_audience is true, ignored otherwise. The name the uploaded audience is saved under. Example: ne_usa_above_50
Required. The name of an approved WhatsApp template.
Example: end_of_year_sale
Required. The WhatsApp language code matching the template's language.
Example: en_uk
Required. The CommBox ID of the WhatsApp channel the campaign is sent from. Encrypted channel ID is not supported. The channel must belong to the same brand as the API key.
Required. The CommBox ID of a sub-channel of stream_id. Leave value empty if there is no subchannel.
Required. The CommBox user id that owns the campaign. The user must belong to the same brand as the API key.
(Optional) An email address that receives the campaign completion report.
Required. When left empty, campaign will be sent immediately. Use unix time in seconds (UTC)
(Optional) The campaign end date and time. Use unix time in seconds (UTC)
Required for templates with placeholders. Enter values for all the template's body placeholders, in order, separated by ;. Omit for templates without body parameters.
Example: John;11/8/1971
(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
OK
Bad Request - The request could not be understood by the server. Incoming parameters might not be valid
Unauthorized - The supplied credentials, if any, are not sufficient to access the resource
Not found - The requested resource is not found
Too Many Requests - Too many requests have been made in a short period of time (Throttling)
Server Error - The server could not return the representation due to an internal server error