Customer Service Account Management Related APIs
Customer Service Account Management Related APIs
Customer Service Account Operations
Batch Import Customer Service Accounts
Type
API
URI
/group-dispatch-api/whatsapp/batchInsert
Request Method
POST、Content-Type: application/json
API Description
Batch import customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | Yes | Customer service account list |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| avatar | String | No | Avatar |
| name | String | No | Name |
| publicKey | String | Yes | Account public key |
| privateKey | String | Yes | Account private key |
| msgPublicKey | String | Yes | Message public key |
| msgPrivateKey | String | Yes | Message private key |
| accountId | String | Yes | Account Id |
| nextKeyId | String | No | nextKeyId |
| registrationId | String | No | Registration id |
| deviceParams | String | No | Device parameters |
| whatsappType | Integer | No | whatsapp account type: 1 personal, 2 business; default is personal |
- Request Example:
{
"whatsAppList": [
{
"whatsApp": "861821726232",
"whatsappType": 1,
"name": "lee",
"avatar": "wwww.baiux.com/1.img",
"publicKey": "",
"privateKey": "",
"msgPublicKey": "",
"msgPrivateKey": "",
"accountId": "",
"nextKeyId": "",
"registrationId": "",
"deviceParams": ""
}
]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Query Customer Service Account Information
Type
API
URI
/group-dispatch-api/whatsapp/queryWhatsAppStatus
Request Method
GET、Content-Type: application/json
API Description
Query all customer service account information
Request Parameter Description
No parameters
Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data List Yes Data
- data Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| status | int | Yes | Status: 1 normal, 2 banned |
| onlineStatus | int | Yes | Online status: 1 online-coming, 2 online, 3 offline-coming, 4 offline |
- Response Example
{
"data": [
{
"whatsApp": "861821371272",
"status": 1,
"onlineStatus": 1
}
],
"code": 200,
"message": "success"
}Batch Online Customer Service Accounts
Type
API
URI
/group-dispatch-api/whatsapp/batchOnline
Request Method
POST、Content-Type: application/json
API Description
Batch online customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | Yes | Customer service account list |
- whatsAppList Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| override | boolean | Yes | Whether to override |
| String | Yes | ||
| avatar | String | No | Avatar |
| name | String | No | Name |
| publicKey | String | Yes | Account public key |
| privateKey | String | Yes | Account private key |
| msgPublicKey | String | Yes | Message public key |
| msgPrivateKey | String | Yes | Message private key |
| nextKeyId | String | No | nextKeyId |
| registrationId | String | No | Registration id |
| accountId | String | No | Account id |
| deviceParams | String | No | Device parameters |
| whatsappType | Integer | No | whatsapp account type: 1 personal, 2 business; default is personal |
- Request Example:
{
"whatsAppList": [
{
"whatsApp": "861821726232",
"whatsappType": 1,
"override": false,
"name": "lee",
"avatar": "wwww.baiux.com/1.img",
"publicKey": "",
"privateKey": "",
"msgPublicKey": "",
"msgPrivateKey": "",
"accountId": "",
"nextKeyId": "",
"registrationId": "",
"deviceParams": ""
}
]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Batch Recycle Customer Service Accounts
Type
API
URI
/group-dispatch-api/whatsapp/batchRecycle
Request Method
POST、Content-Type: application/json
API Description
Batch recycle customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | No | Customer service accounts |
- Request Example:
{
"whatsAppList": ["861821726232", "861821726231"]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Sync WhatsApp Account Status
Configuration ID <CHANNEL_SYNC_STATUS>
Type
WebHook
URI
/callback/gsTask/syncWhatsAppStatus
Request Method
POST、Content-Type: application/json
API Description
Sync WhatsApp account status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | Customer service account | |
| status | int | Yes | Status: 1 normal, 2 banned |
| onlineStatus | int | Yes | Online status: 1 online-coming, 2 online, 3 offline-coming, 4 offline |
| reason | String | No | Failure reason |
| instanceCode | String | No | Scanning ID |
- Request Example:
{
"whatsApp": "8218132718231",
"status": 1,
"onlineStatus": 1,
"reason": "",
"instanceCode": ""
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}reason (exception reason) description
code description 1001 Pairing failed. Please scan again 1002 Network exception. Please change IP
Customer Service Account Registration
Customer Service Account Registration (Submit Phone Number)
Type
API
URI
/group-dispatch-api/register/submitPhone
Request Method
POST、Content-Type: application/json
API Description
Customer service account registration
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| verifyType | int | Yes | Verification code type: 0 sms, 1 voice, 2 missed call, 3 internal verification |
| accountType | int | Yes | Account type: 1 personal, 2 business |
| areaCode | String | Yes | Area code |
| countryCode | String | Yes | Country code |
- Request Example:
{
"phone": "182172623211",
"verifyType": 1,
"accountType": 2,
"areaCode": "+86",
"countryCode": "CN"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data int Yes Task id Response Example
{
"data": 12,
"code": 200,
"message": "success"
}Customer Service Account Registration (Submit Verification Code)
Type
API
URI
/group-dispatch-api/register/submitVerifyCode
Request Method
POST、Content-Type: application/json
API Description
Customer service account registration (verification code)
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| areaCode | String | Yes | Area code |
| verifyCode | String | Yes | Verification code |
- Request Example:
{
"phone": "1821726232",
"verifyCode": "123456",
"areaCode": "+86"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Sync Customer Service Account Registration Status
Configuration Id <CHANNEL_REGISTER_STATUS>
Type
WebHook
URI
/group-dispatch-api/register/syncStatus
Request Method
POST、Content-Type: application/json
API Description
Sync customer service account registration status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| status | int | Yes | 1 successful, 0 failed |
- Request Example:
{
"phone": "861821726232",
"status": "1"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}