Mass Dispatch Related APIs
Mass Dispatch Related APIs
Create Mass Dispatch Interface
**The maximum number of friend phone numbers for a mass dispatch task is 5000, and the content length of a single message cannot exceed 1024.
The mobile app currently supports Text, Images, and Hyperlinks (not clickable).
The PC app currently supports Text and Images.
Quick Create Mass Dispatch Task (Specified Customer Service Account, Single Sending Target)
Type
API
URI
/group-dispatch-api/gsTask/assign/soCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task with one sending target. Supports multiple or single content items.
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled start time; default current time |
| endTaskTime | String | No | Scheduled end time; future time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat, 3 cloud PC; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| sendWhatsApp | String | Yes | Customer service WhatsApp |
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (used when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (used when message type is routing link) |
| title | String | No | Title (used when message type is contact card link) |
| desc | String | No | Description (used when message type is contact card link) |
| link | String | No | Link (used when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- Request Example-1:
{
"name": "task-202403201653119191",
"sendType": 1,
"startTaskTime": "2024-04-21 17:01:27",
"targetType": 1,
"sendWhatsApp": "8618217331213",
"friendWhatsApp": "8618217331211",
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [],
"transId": ""
}
]
}- Request Example-2:
{
"name": "task-202403201653119191",
"sendType": 1,
"startTaskTime": "2024-04-21 17:01:27",
"targetType": 1,
"sendWhatsApp": "8618217331213",
"friendWhatsApp": "8618217331211",
"content": [
{
"type": 1,
"text": "Hello {friendName}, today is your birthday ({birthday}). All products are 70% off. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [
{
"type": 1,
"name": "friendName"
},
{
"type": 1,
"name": "birthday"
}
],
"transId": ""
}
]
}- Request Example-3:
{
"name": "api-specified-account-single-target",
"targetType": 1,
"startTaskTime": "2024-10-16 17:49:02",
"endTaskTime": null,
"sendType": 2,
"sendWhatsApp": "8618812341234",
"friendWhatsApp": "8615212877543",
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data Object Yes Data
- data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Quick Create Mass Dispatch Task (Specified Accounts & Multiple Targets, Same Content)
Type
API
URI
/group-dispatch-api/gsTask/assign/moscCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task with multiple customer service accounts and multiple targets. Supports multiple or single content items.
Note: binds sender and receiver relationships.Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| sendInfos | List | Yes | Customer service send-info list |
| content | List | Yes | Content list |
- sendInfos
| Field | Type | Required | Remarks |
|---|---|---|---|
| sendWhatsApp | String | Yes | Customer service WhatsApp |
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| fileName | String | No | File name; used when url is not empty |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
Same as above
- Request Example-1:
{
"name": "task-202403201653119191",
"sendType": 1,
"startTaskTime": "2024-04-21 17:01:27",
"targetType": 1,
"sendInfos": [
{
"sendWhatsApp": "8618217331213",
"friendWhatsApp": "8618217331211"
}
],
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": []
}
]
}- Request Example-2:
{
"name": "task-202403201653119191",
"sendType": 1,
"startTaskTime": "2024-04-21 17:01:27",
"targetType": 1,
"sendInfos": [
{
"sendWhatsApp": "8618217331213",
"friendWhatsApp": "8618217331211"
}
],
"content": [
{
"type": 1,
"text": "Hello {friendName}, today is your birthday ({birthday}). All products are 70% off. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [
{
"type": 1,
"name": "friendName"
},
{
"type": 1,
"name": "birthday"
}
]
}
]
}- Request Example-3:
{
"name": "api-task",
"targetType": 1,
"startTaskTime": "2024-10-16 18:00:00",
"sendType": 2,
"sendInfos": [
{
"sendWhatsApp": "8618812341234",
"friendWhatsApp": "8615212877543"
}
],
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
- data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Quick Create Mass Dispatch Task (Specified Accounts & Multiple Targets, Different Content)
Type
API
URI
/group-dispatch-api/gsTask/assign/modcCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task with multiple customer service accounts and multiple targets. Supports multiple or single content items.
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| sendInfos | List | Yes | Send payloads |
- sendInfos Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| sendWhatsApp | String | Yes | Customer service WhatsApp |
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
Basic Attributes
Same as above
Request Example-1:
{
"name": "task-202403201653119191",
"targetType": 1,
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"sendInfos": [
{
"sendWhatsApp": "8618217331213",
"friendWhatsApp": "8618217331211",
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": []
}
]
}
]
}- Request Example-2:
{
"name": "api-task",
"targetType": 1,
"startTaskTime": "2024-10-16 18:00:00",
"sendType": 2,
"sendInfos": [
{
"sendWhatsApp": "8618812341234",
"friendWhatsApp": "8615212877543",
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
- data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Quick Create Mass Dispatch Task (Multiple Accounts & Targets, Unbound)
- Type
API
- URI
/group-dispatch-api/gsTask/assign/mmCreate
- Request Method
POST、Content-Type: application/json
- API Description
Create a mass dispatch task with multiple customer service accounts and targets. Supports multiple or single content items. No binding; free assignment.
- Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| sendWhatsAppList | List | Yes | Customer service account list |
| friendWhatsAppList | List | Yes | Friend WhatsApp list / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- Request Example-1:
{
"name": "many-to-many-create-1",
"startTaskTime": "2024-07-21 17:01:27",
"endTaskTime": null,
"sendType": 1,
"targetType": 1,
"sendWhatsAppList": ["6578645661211"],
"friendWhatsAppList": ["8618217331211"],
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"transId": "tr00003",
"variableFields": []
},
{
"type": 1,
"text": "Hello {friendName}, today is your birthday. All products are 70% off. Come and check them out.",
"url": "",
"sort": "",
"transId": "tr00002",
"variableFields": [
{
"type": 1,
"name": "friendName"
}
]
}
]
}- Request Example-2:
{
"name": "many-to-many-create-2",
"startTaskTime": "2024-10-16 18:00:00",
"sendType": 1,
"targetType": 1,
"sendWhatsAppList": ["8618812341234"],
"friendWhatsAppList": ["8615212877543"],
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "278881"
}
}Quick Create Mass Dispatch Task (Specified Account Group)
- Type
API
- URI
/group-dispatch-api/gsTask/assign/groupCreate
- Request Method
POST、Content-Type: application/json
- API Description
Create a mass dispatch task using a customer service account group.
- Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| whatsappGroupId | int | Yes | WhatsApp audience group id |
| friendWhatsAppList | List | Yes | Friend WhatsApp list / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets matching routeType: agent = agent id; group = WhatsApp group id; custom = WhatsApp number (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- Request Example-1:
{
"name": "account-group-create-mass-send-1",
"startTaskTime": "2024-07-21 17:01:27",
"endTaskTime": null,
"sendType": 1,
"targetType": 1,
"whatsappGroupId": 68,
"friendWhatsApp": ["8618217331211"],
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"transId": "tr00003"
},
{
"type": 1,
"text": "Hello {friendName}, today is your birthday. All products are 70% off. Come and check them out.",
"transId": "tr00002",
"variableFields": [
{
"type": 1,
"name": "friendName"
}
]
},
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "876"
}
}Quick Create Mass Dispatch Task (Unspecified Account, Single Target)
Type
API
URI
/group-dispatch-api/gsTask/noAssign/soCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task with one sending target. Supports multiple or single content items.
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- Request Example-1:
{
"name": "task-202403201653119191",
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"targetType": 1,
"friendWhatsApp": "8618217331211",
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": []
}
]
}- Request Example-2:
{
"name": "task-202403201653119191",
"targetType": 1,
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"friendWhatsApp": "8618217331211",
"content": [
{
"type": 1,
"text": "Hello {friendName}, today is your birthday. All products are 70% off. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [
{
"type": 1,
"name": "friendName"
}
]
}
]
}- Request Example-3:
{
"name": "api-task",
"targetType": 1,
"startTaskTime": "2024-10-16 18:00:00",
"sendType": 2,
"friendWhatsApp": "8615212877543",
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
- data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Quick Create Mass Dispatch Task (Unspecified Account, Multiple Targets)
Type
API
URI
/group-dispatch-api/gsTask/noAssign/moCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task with one sending target. Supports multiple or single content items.
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| friendWhatsApp | List | Yes | Friend WhatsApp / group id |
| content | List | Yes | Content list |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- Request Example-1:
{
"name": "task-202403201653119191",
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"targetType": 1,
"friendWhatsApp": ["8618217331211"],
"content": [
{
"type": 1,
"text": "Hello! All products are 10% off today. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": []
}
]
}- Request Example-2:
{
"targetType": 1,
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"friendWhatsApp": ["8618217331211"],
"content": [
{
"type": 1,
"text": "Hello {friendName}, today is your birthday. All products are 70% off. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [
{
"type": 1,
"name": "friendName"
}
]
}
]
}- Request Example-3:
{
"name": "api-task",
"targetType": 1,
"startTaskTime": "2024-10-16 18:00:00",
"sendType": 2,
"friendWhatsApp": ["8615212877543"],
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Quick Create Mass Dispatch Task (Unspecified Account, Conditional Targets)
Type
API
URI
/group-dispatch-api/gsTask/noAssign/comoCreate
Request Method
POST、Content-Type: application/json
API Description
Create a mass dispatch task without specifying customer service accounts; resolve targets by conditions; supports automated behaviors. Note: group mass dispatch does not support message variables.
- Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Task name |
| startTaskTime | String | No | Scheduled task start time; default current time |
| endTaskTime | String | No | Scheduled task end time |
| sendType | int | No | Send channel: 1 PC, 2 mobile WaChat; default PC |
| agentAccount | string | No | Agent account (send as specified agent) |
| targetType | int | Yes | Target type: 1 individual, 2 group |
| targetAudienceCondition | List | Yes | Target audience conditions (individual) |
| targetAudienceConditionOnGroup | TargetAudienceConditionOnGroup | Yes | Target audience query conditions (group) |
| automatedBehavior | List | No | Automated trigger behaviors |
| content | List | Yes | Content list |
- targetAudienceCondition Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| type | String | Yes | Content type: 1 basic attribute, 2 extended field |
| name | String | Yes | Name (field) |
| opsType | int | No | Ops type: 1 less than, 2 equal, 3 greater than, 4 range (between) |
| value | String | No | Value |
| rangeValueStart | String | No | Start value (opsType=4) |
| rangeValueEnd | String | No | End value (opsType=4) |
- automatedBehavior Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| eventType | int | Yes | Event type: 1 message sent successfully, 2 message send failed |
| actionType | int | Yes | Action type: 1 customer stage change, 2 customer tag change |
| opsType | int | Yes | Ops type: 1 add, 2 remove, 3 modify |
| customerTagValue | List | No | Tag value list |
| customerStageValue | int | No | Customer stage |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video, 6 contact card, 10 contact card link, 11 routing link |
| text | String | No | Text content |
| url | String | No | Static resource URL |
| sort | int | No | Sort order |
| variableFields | List | No | Variable list |
| transId | String | No | transId |
| routeType | int | No | 1 agent routing, 2 WhatsApp group routing, 3 custom inbound (when message type is routing link) |
| routeList | List | No | Routing targets: agent = agent id; group = WhatsApp group id; type 3 = WhatsApp numbers matching routeType (when message type is routing link) |
| title | String | No | Title (when message type is contact card link) |
| desc | String | No | Description (when message type is contact card link) |
| link | String | No | Link (when message type is contact card link) |
| adsTemplateId | int | No | Ad template id; currently only contact card link. If set, overrides (title, desc, link, url). Configure in advance before use |
- variableField Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Variable type: 1 basic attribute, 2 extended field (admin backend config) |
| name | String | Yes | Field name |
- Basic Attributes
| Field | Description |
|---|---|
| Customer service account | |
| friendName | Name |
| sex | Gender |
| birthday | Birthday |
| address | Address |
| profession | Profession |
| income | Income |
| desc | Notes |
| source | Source |
| stage | Stage |
| languageTag | Language |
| tabName | Tag |
| followStatus | Follow-up status |
- TargetAudienceConditionOnGroup Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| whatsappList | List | No | Customer service number list |
| groupTabIds | List | No | Group tag id list |
| principalList | List | No | Owners |
| groupName | String | No | Group name; supports fuzzy search |
- Request Example-1:
{
"name": "task-20240320175301",
"targetType": 1,
"startTaskTime": "2024-04-22 10:29:55",
"endTaskTime": null,
"sendType": 2,
"content": [
{
"type": 1,
"text": "Hello {friendName}, today is your birthday ({birthday}). All products are 70% off. Come and check them out.",
"url": "",
"sort": 0,
"variableFields": [
{
"type": 1,
"name": "friendName"
},
{
"type": 1,
"name": "birthday"
}
]
}
],
"targetAudienceCondition": [
{
"type": "1",
"name": "Age",
"opsType": "1",
"value": "20"
},
{
"type": "1",
"name": "money",
"opsType": "4",
"rangeValueStart": "5000",
"rangeValueEnd": "10000"
}
],
"automatedBehavior": [
{
"eventType": "1",
"actionType": "1",
"opsType": "3",
"customerTagValue": "Contacted"
}
]
}- Request Example-2:
{
"name": "20240802165237",
"sendType": 1,
"startTime": "2024-08-02 16:52:37",
"targetType": 1,
"content": [
{
"type": 11,
"text": "hello, this is agent routing link",
"sort": 0,
"routeType": 1,
"routeList": ["801406"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 1,
"routeType": 2,
"routeList": ["67"]
},
{
"type": 11,
"text": "hello, this is customer service group routing link",
"sort": 2,
"routeType": 3,
"routeList": ["8619876543210"]
},
{
"type": 10,
"text": "hello, this is contact card hyperlink",
"sort": 3,
"url": "https://www.google.com/favicon.ico",
"title": "Title",
"desc": "This is a contact card hyperlink",
"link": "https://www.google.com/"
},
{
"type": 10,
"text": "hello, this is contact card hyperlink 2",
"sort": 4,
"adsTemplateId": 32
}
],
"automatedBehaviorDTOS": [],
"targetAudienceConditionOnGroup": {
"groupName": "test",
"whatsappList": ["86187272722"],
"groupTabIds": [10295],
"principalList": [621485]
}
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | String | Yes | Data |
- data Response Parameters
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"taskId": "6a2724fa2b7055971f960cc162632595"
}
}Mass Dispatch Query APIs
Query Mass Dispatch Task Execution Status
Type
API
URI
/group-dispatch-api/gsTask/queryExecuteStatus
Request Method
Get、Content-Type: application/json
API Description
Query mass dispatch task execution status.
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Order id |
- Request Example:
group-dispatch-api/gsTask/queryExecuteStatus?taskId=174
- Response Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
- data Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| info | List | Yes | Mass dispatch task details |
| taskId | String | Yes | Task id |
| status | int | Yes | Task status: 1 pending start, 2 pending send, 3 dispatching, 4 stopped, 5 completed, 6 paused |
- info Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
| status | int | Yes | Status: 0 pending dispatch, 1 pending send, 2 sending, 3 sent, 4 delivered, 5 read, 6 read-replied, 7 read-no-reply, -1 send failed |
| time | String | Yes | Time (when this status was triggered) |
- Response Example
{
"data": {
"taskId": "7ecb410f496db67f549aac211cf2be7d",
"status": 1,
"info": [
{
"whatsApp": "86172162521",
"friendWhatsApp": "86172162521",
"time": "2023-07-12 10:43:00",
"status": 1
},
{
"whatsApp": "86172162522",
"friendWhatsApp": "86172162522",
"time": "2023-07-12 10:43:00",
"status": 2
}
]
},
"code": 200,
"message": "success"
}Mass Dispatch Operation APIs
Batch Start
Type
API
URI
Batch start /group-dispatch-api/gsTask/batchStart
Request Method
POST、Content-Type: application/json
API Description
Batch start
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| ids | array | Yes | Task id list |
- Request Example:
group-dispatch-api/gsTask/batchStart
[
12,
13,
14
]- Response Example
{
"data":"",
"code": 200,
"message": "success"
}Batch Pause
Type
API
URI
/group-dispatch-api/gsTask/batchPause
Request Method
POST、Content-Type: application/json
API Description
Batch pause
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| ids | array | Yes | Task id list |
- Request Example:
group-dispatch-api/gsTask/batchPause
[
12,
13,
14
]- Response Example
{
"data":"",
"code": 200,
"message": "success"
}Batch Stop Tasks
Type
API
URI
Batch stop /group-dispatch-api/gsTask/batchStop
Request Method
POST、Content-Type: application/json
API Description
Batch start, batch pause, batch stop
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| ids | array | Yes | Task id list |
- Request Example:
group-dispatch-api/gsTask/batchStop
[
12,
13,
14
]- Response Example
{
"data":"",
"code": 200,
"message": "success"
}Async Notification APIs (Webhook)
Async Notification: Mass Dispatch Task Execution Status
Configuration ID <GS_V3_SYNC_TASK_STATUS>
Type
WebHook
URI
/callback/gsTask/syncTaskStatus
Request Method
POST、Content-Type: application/json
API Description
Async notification of order execution status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Order id |
| status | String | Yes | Task status: 1 pending start, 2 pending send, 3 dispatching, 4 stopped, 5 completed, 6 paused |
Request Example:
{
"taskId": "6a2724fa2b7055971f960cc162632595",
"status": "1"
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
{
"data": "",
"code": 200,
"message": "success"
}Async Notification: Mass Dispatch Task Detail Execution Status
Configuration ID GS_V3_SYNC_TASK_DETAIL_STATUS
Type
WebHook
URI
/callback/gsTask/syncGsTaskInfoStatus
Request Method
POST、Content-Type: application/json
API Description
Async notification of order detail execution status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| groupSendInfoStatusList | List | Yes | Task list |
- Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id |
| info | List | Yes | Task details |
- info Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| senderWhatsApp | String | No | Customer service account |
| friendWhatsApp | String | Yes | Friend WhatsApp / group id |
| status | int | Yes | Status: 0 pending dispatch, 1 pending send, 2 sending, 3 sent, 4 delivered, 5 read, 6 read-replied, 7 read-no-reply, -1 send failed |
| time | long | Yes | Time (timestamp when this status was triggered) |
| infoId | int | Yes | Task detail id |
| failReasonCode | int | No | Send failure code (updated 20251223) |
| transId | String | No | transId |
- failReasonCode reference:
PC client send failure codes
| code | Error description |
|---|---|
| 800 | Exit client |
| 801 | Port does not exist |
| 802 | Client send logic error |
| 803 | Chinese text send restriction |
| 804 | Resource download failed |
| 805 | WhatsApp send text logic error |
| 806 | WhatsApp send media logic error |
| 807 | WhatsApp send vCard logic error |
| 808 | Group not found |
| 809 | Friend blocked |
| 810 | Friend vCard not found |
| 811 | Customer service account logged out |
| 812 | Refresh customer service account |
| 813 | Cannot send to friend |
| 814 | Cannot send to group |
| 815 | Invalid group |
| 816 | Only admins may send |
| 817 | Message URL not found |
| 818 | Message type not found |
| 819 | My customer service account not found |
| 820 | Number sieve error |
| 821 | Stranger chat create error |
| 822 | Group info update error |
Mobile WaChat send failure codes
| code | Error description |
|---|---|
| 700 | Account no longer exists |
| 701 | Mass dispatch count limit reached |
| 702 | Task completed and recycled |
| 703 | Timeout |
| 704 | Login popup appeared |
| 705 | Account banned |
| 706 | Login success not detected |
| 707 | Stopped manually |
| 708 | Hour clock timeout |
| 709 | Image download failed |
| 710 | Account abnormally unavailable |
| 712 | Number abnormal |
| 713 | Mass dispatch task send failed |
| 714 | Account abnormal: Apple account |
| 715 | Message response timeout |
| 716 | Send timeout |
| 718 | Account send restricted |
| 719 | Login from another location |
| 720 | QR scan timeout |
| 721 | Invalid number |
| 722 | channelData error |
| 723 | Sieve failed |
Other errors
| code | Error description |
|---|---|
| 900 | Pending send timeout |
| 999 | Unknown error |
- Request Example:
{
"groupSendInfoStatusList": [
{
"taskId": "6a2724fa2b7055971f960cc162632595",
"info": [
{
"senderWhatsApp": "861271625212",
"friendWhatsApp": "911827121626",
"time": 1721358108467,
"status": 1,
"infoId": 95,
"failReasonCode": null,
"transId": null
},
{
"senderWhatsApp": "861271625212",
"friendWhatsApp": "911827121621",
"time": 1721358108467,
"status": 1,
"infoId": 96,
"failReasonCode": null,
"transId": null
}
]
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
{
"data": "",
"code": 200,
"message": "success"
}Async Notification: Mass Dispatch Task Reply Message Callback
Configuration ID <GS_V3_REPLY_MESSAGE>
Type
WebHook
URI
/callback/gsTask/syncGsTaskInfoReplyMessage
Request Method
POST、Content-Type: application/json
API Description
Async notification: mass dispatch task reply message callback
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| userId | String | Yes | User id |
| serialNumber | int | No | Serial number |
| String | Yes | whatsApp (message receiver) | |
| friendWhatsApp | String | Yes | friendWhatsApp (message sender) |
| taskId | String | Yes | Task id |
| taskInfoId | String | Yes | Task detail id |
| content | List | Yes | Reply content |
- content Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Content type: 1 text, 2 image, 3 audio, 4 file, 5 video |
| text | String | No | Text content |
| url | String | No | Static resource metadata |
| messageId | String | Yes | Message id |
| time | long | Yes | Timestamp |
- url Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| filename | String | Yes | File name |
| url | String | Yes | Link URL |
| mimeType | String | Yes | Media type |
| caption | String | No | Title |
Request Example:
{
"userId": "101",
"serialNumber": "",
"whatsApp": "86172272727",
"friendWhatsApp": "61191828282",
"taskId": "6a2724fa2b7055971f960cc162632595",
"taskInfoId": "9812343432",
"content": [
{
"type": 1,
"text": "hello",
"messageId": "19282dskdasldjl21",
"time": 1689129792000
},
{
"type": 2,
"url": {
"filename": "e70faa31-62dc-4d00-a42a-8a07735aa350",
"url": "https://id-wscrm.oss-accelerate.aliyuncs.com/client/d584b8cfb9185cc999389f17b4236b3b/61733005-dfdb-4704-9c5d-944423c70dd1",
"mimeType": "image/jpeg",
"caption": ""
},
"messageId": "1282190210219082198",
"time": 1689129792000
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
{
"data": "",
"code": 200,
"message": "success"
}WhatsApp Audience Management APIs
Add WhatsApp Audience Group
Type
API
URI
/group-dispatch-api/whatsapp-audience/addWhatsappAudience
Request Method
POST、Content-Type: application/json
API Description
Add WhatsApp audience group
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | Yes | Group name |
| whatsIdList | List | Yes | WhatsApp id list |
- Request Example:
{
"name": "this name",
"whatsIdList": ["99123456", "98123456"]
}- Response Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
- data Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| id | int | Yes | WhatsApp audience group id |
| count | int | Yes | Number of successfully saved records |
- Response Example
{
"data": {
"id": 73,
"count": 2
},
"code": 200,
"message": "success"
}Query WhatsApp Audience Groups
Type
API
URI
/group-dispatch-api/whatsapp-audience/query
Request Method
GET、Content-Type: application/json
API Description
Query WhatsApp audience groups
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| name | String | No | Group name |
| id | int | No | WhatsApp audience group id |
| current | int | No | Pagination: current page, default 1 |
| size | int | No | Pagination: page size, default 10 |
- Request Example:
group-dispatch-api/whatsapp-audience/query?id=73
- Response Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
- data Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| records | List | Yes | WhatsApp audience group list |
| total | int | Yes | Total count |
- records Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| id | int | Yes | WhatsApp audience group id |
| name | String | No | Group name |
| items | List | Yes | Customer service account entries |
- items Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account |
| countryCode | String | Yes | Customer service number region; localized by request header language |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"records": [
{
"id": 73,
"name": "this name",
"items": [
{
"phone": "99123456",
"countryCode": "UNKNOWN"
},
{
"phone": "98123456",
"countryCode": "Iran"
}
]
}
],
"total": 1
}
}Query WhatsApp Audience Group Detail
Type
API
URI
/group-dispatch-api/whatsapp-audience/queryDetail
Request Method
GET、Content-Type: application/json
API Description
Query WhatsApp audience group detail
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| id | int | Yes | WhatsApp audience group id |
- Request Example:
/group-dispatch-api/whatsapp-audience/queryDetail?id=73
- Response Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | Yes | Description |
| data | Object | Yes | Data |
- data Parameter Description
| Name | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account |
| countryCode | String | Yes | Customer service number region; localized by request header language |
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"phone": "99123456",
"countryCode": "UNKNOWN"
},
{
"phone": "98123456",
"countryCode": "Iran"
}
]
}