Query Message Campaign List
Query the information of all message campaigns.
Request URL
GET {base_url}/{api_path}/message_campaign/list?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | Yes | Integer | Define which page is displayed. |
| page_size | Yes | Integer | Define how many records per page. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of message campaigns. |
| data | Array <MSGCampaign_Info> | The information of message campaigns. |
- MSGCampaign_Info
-
Parameter Type Description id Integer The ID of the message campaign. name String The name of the message campaign. status String The status of the message campaign. draft: The campaign is saved as a draft.scheduled: The campaign is scheduled to be sent at the specified time.pending: The campaign is waiting to send messages because another campaign is in progress.executing: The campaign is currently sending messages.completed: The campaign has completed sending all messages.stop: The campaign was unexpectedly stopped due to a system issue, such as system restart, subscription issue, etc.retrying: The campaign is retrying to send messages.
channel_type String The type of message channel used by the campaign. sms: SMS channel.whatsapp: WhatsApp channel.
channel_name String The name of the message channel used by the campaign. sender String The number used to send messages. recipient_type String The method used to add recipients to the campaign. input: Add recipients by manual input or file import.phonebook: Add recipients from a specified phonebook.
recipient_name String The name of the phonebook where the recipients' numbers are stored. recipient_num_type String The type of phone number field from which to retrieve the recipient's number in the specified phonebook. send_type String When the campaign message should be sent. immediately: Messages are sent as soon as the campaign is saved.schedule: Messages are sent at a scheduled time.draft: The campaign is saved as a draft and no messages are sent.
send_time Integer The timestamp of the scheduled time when the campaign messages should be sent. send_mode String The sending mode of the campaign. new_session: New sessions will be created and assigned to a specified destination when sending campaign messages.direct: Messages will be sent directly without creating new sessions.
result_count String The sending result of the campaign. Format:
failed_count/total_countresponse_rate String The response rate of the campaign messages.
Example
Request example
GET /openapi/v1.0/message_campaign/list?access_token=3pLZ96FkWJxfYsOEIMokkGjWMMWT6g4g&page=1&page_size=20 HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 3,
"list": [
{
"id": 5,
"name": "VIP Discount Campaign",
"status": "completed",
"channel_type": "sms",
"channel_name": "SMS channel",
"sender": "+14102161183",
"recipient_type": "phonebook",
"recipient_name": "VIP_Contacts_Phonebook",
"recipient_num_type": "business_number",
"send_type": "immediately",
"send_time": 1753250650,
"send_mode": "direct",
"result_count": "2/2",
"response_rate": "0%"
},
{
"id": 2,
"name": "July Promotion",
"status": "completed",
"channel_type": "sms",
"channel_name": "SMS channel",
"sender": "+1243546576",
"recipient_type": "input",
"recipient_name": "",
"recipient_num_type": "",
"send_type": "immediately",
"send_time": 1753172394,
"send_mode": "new_session",
"result_count": "10/10",
"response_rate": "0%"
},
{
"id": 1,
"name": "June Promotion",
"status": "completed",
"channel_type": "sms",
"channel_name": "SMS channel",
"sender": "+1243546576",
"recipient_type": "phonebook",
"recipient_name": "Company A Customer",
"recipient_num_type": "business_number",
"send_type": "immediately",
"send_time": 1753163109,
"send_mode": "new_session",
"result_count": "6/6",
"response_rate": "0%"
}
]
}