WhatsApp Bulk Upload
Use the WhatsApp Bulk Upload APIs to upload recipient files and start, pause, or resume bulk WhatsApp campaigns.
API flow
Upload a CSV or plain text file that contains recipient phone numbers and messages.
Start, pause, or resume the uploaded bulk campaign.
File Upload API
The File Upload API sends multiple messages to users in a single upload.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wba/v2/upload |
| Authorization | jwt |
| Request Body schema | multipart/form-data |
Query parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| source | string | source=UI | The details of the source for uploading the file for a bulk campaign. |
| debug | any | debug=True | The parameter that enables or disables the debug mode. Set the default value of debug=True to enable the debug mode. The system generates additional information and logs to help resolving troubleshoot and debug issues with the bulk campaigns. |
Debug enum values
"True""False"
Request body parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| campaign_type | Yes | string | The type of campaign being sent, which can be either generalized or personalized. |
| file | Yes | string | The CSV or plain text file path on your local system or network that you want to upload as part of a bulk campaign. The file contains the list of phone numbers and messages. |
| file_mimetype | Yes | string | The MIME type of the file containing the phone numbers of the recipients. The type of the file can be either "text/plain" or "text/csv". |
| filename | Yes | string | The name of the file containing the phone numbers of the recipients, including the file extension. |
| message | Yes | string | The message that you want to send to the users along with the file. |
See the sample files for more information on bulk upload files and their details:
- Bulk Upload File
- Bulk Upload Campaign File
- Campaign File
File Upload responses
200 Success
Response
{
"message": "File uploaded successfully",
"campaign_id": "670b3fd4-d442-11ed-a821-xxxxxxxxxxxx",
"file_type": "text/csv",
"file_size": "19.0B",
"total_records": 1,
"valid_records": 1,
"duplicate records": 0,
"campaign_type": "generalized",
"message_preview": {
"phone": "91868841xxxx",
"enable_acculync": true,
"extra": "{'asd':'asd'}",
"media": {
"type": "media_template",
"template_name": "boarding_pass_update",
"lang_code": "en",
"header": [
{
"image": {
"link": "https://media.istockphoto.com/vectors/airplane-ticket-boarding-pass-ticket-template-vector-id878xxxxxx"
}
}
],
"body": [
{
"text": "Here is your boarding pass"
}
]
}
},
"asynchronous": false,
"country_code": "string"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The outcome of the file upload process. |
| campaign_id | string | The unique identifier for the campaign associated with the uploaded file. |
| file_type | string | The type of the uploaded file. |
| file_size | string | The size of the uploaded file. |
| total_records | integer | The total number of records present in the uploaded file. |
| valid_records | integer | The count of valid records within the uploaded file. |
| duplicate records | integer | The count of duplicate records found in the uploaded file. |
| campaign_type | string | The type of campaign being sent, which can be either generalized or personalized. |
| message_preview | object (inline_response_200_4_message_preview) | A preview of the message or content associated with the campaign. |
| asynchronous | boolean | The parameter indicates whether the file upload process is synchronous or asynchronous. |
| country_code | string | The country code. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
422 Unprocessable Entity (WebDAV)
Response
{
"message": "please check API docs for more info",
"status": "failed",
"reason": {
"campaign_type": [
"Must be one of: generalized, personalized."
]
}
}Response Schema: application/json
One of Unknown Campaign Type Error / File Mimetype Error
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status of the file upload. |
| reason | object | The reason for not processing the file upload request. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message delivery. |
| message | string | The message response. |
Send Bulk Campaign API
The Send Bulk Campaign API sends messages in bulk to multiple users, manages large-scale campaigns, and reduces the workload for marketers or business owners.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wba/v2/manage_campaign |
| Authorization | jwt |
| Request Body schema | application/json |
Query parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| debug | any | debug=True | The parameter that enables or disables the debug mode. Set the default value of debug=True to enable the debug mode. The system generates additional information and logs to help resolving troubleshoot and debug issues with the bulk campaigns. |
| source | string | source=UI | The details of the source for uploading the file for a bulk campaign. |
Debug enum values
"True""False"
Campaign actions
Request body example
{
"campaign_action": "start",
"campaign_id": "{campaign id}",
"campaign_name": "{campaign name}",
"file_mimetype": "text/plain or text/csv",
"filename": "{filename with extension}",
"payload": {
"type": "{payload type}"
},
"scheduled_time": "{date and time in UTC e.g.2021-12-08 13:36:00}"
}Request Body schema: application/json
| Parameter | Required | Type | Description |
|---|---|---|---|
| campaign_action | Yes | string | The action to be taken for the campaign. For sending a bulk campaign, the value should be set to "start". |
| campaign_id | Yes | string | The unique identifier for the campaign. This ID is generated by WhatsApp when you execute the File Upload API. |
| campaign_name | Yes | string | The name of the campaign. |
| file_mimetype | Yes | string | The MIME type of the file containing the phone numbers of the recipients. The type of the file can be in different formats, such as "text/plain" or "text/csv". |
| filename | Yes | string | The name of the file containing the phone numbers of the recipients, including the file extension. |
| payload | Yes | object (wbav2manage_campaign_payload) | An object representing the template type, such as media template. |
| scheduled_time | Yes | string | The date and time at which the campaign should be scheduled to start, in UTC format. The format of the string should be "YYYY-MM-DD HH:mm:ss". |
Request body example
{
"campaign_action": "pause",
"campaign_id": "{campaign id}"
}| Parameter | Required | Type | Description |
|---|---|---|---|
| campaign_action | Yes | string | The action to be taken for the campaign. For sending a bulk campaign, the value should be set to "resume". |
| campaign_id | Yes | string | The unique identifier for the campaign. This ID is generated by WhatsApp when you execute the File Upload API. |
Request body example
{
"campaign_action": "resume",
"campaign_id": "{campaign id}"
}| Parameter | Required | Type | Description |
|---|---|---|---|
| campaign_action | Yes | string | The action to be taken for the campaign. For sending a bulk campaign, the value should be set to "pause". |
| campaign_id | Yes | string | The unique identifier for the campaign. This ID is generated by WhatsApp when you execute the File Upload API. |
Send Bulk Campaign responses
202 Accepted
Response
{
"status": "success",
"message": "campaign with id 670b3fd4-d442-11ed-a821-xxxxxxxxxxxx is now processing"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message. |
| message | string | The response message. |
400 Bad Request
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "file name mismatch between /upload and /campaign endpoints for 670b3fd4-d442-11ed-a821-xxxxxxxxxxxx"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message. |
| message | string | The response message. |
| reason | string | The reason for not processing the message. |
401 Authentication Failure
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "jwt token expired"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message. |
| message | string | The response message. |
| reason | string | The reason for not processing the message. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
422 Unprocessable Entity (WebDAV)
Response
{
"message": "please check API docs for more info",
"status": "failed",
"reason": {
"payload": [
"Unable to check payload type"
]
}
}Response Schema: application/json
One of Incorrect Response Type Error/Incorrect Campaign ID Error
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status of the bulk send campaign. |
| reason | object | The reason for not processing the bulk send campaign request. |
500 Internal Server Error
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "<internal server error reason>"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the bulk campaign. |
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
Updated 12 days ago