Groups (Communities)
Groups (Communities)
Query Community Information
Description
Paginated query of community (group) information under the current company. Pagination only; no filter conditions. Company ID is taken from the request header
tenant_id. See Development Guide - Common Header Parameters for authentication.URI
/wscrm-bus-api/open/group/page
Request Method
POST, Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| current | Integer | No | Page number, default 1 |
| pageSize | Integer | No | Page size, default 20 |
- Request Example
{
"current": 1,
"pageSize": 20
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | No | Description |
| data | Object | No | Data |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| total | Integer | Yes | Total records |
| size | Integer | Yes | Page size |
| current | Integer | Yes | Current page |
| pages | Integer | Yes | Total pages |
| records | array | Yes | Community list |
records Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| groupWhatsId | String | Yes | Group ID, unique identifier |
| groupName | String | No | Group name |
| groupDesc | String | No | Group description, empty string when no data |
| groupType | Integer | No | Group type: 1 normal, 2 announcement, 3 community |
| parentGroupId | String | No | Parent group ID, empty string when no data |
| groupAdministrator | List(String) | No | Group administrator WhatsApp numbers |
| languageTag | String | No | Group language tag, empty string when no data |
| serialNumber | String | No | Group serial number, empty string when no data |
| remark | String | No | Group remark, empty string when no data |
| lastChatTime | String | No | Last chat time, format yyyy-MM-dd HH:mm:ss; empty string when no data |
| createBy | Long/String | No | Creator user ID; empty string when no data |
- Response Example
{
"code": 200,
"message": "成功 ",
"data": {
"records": [
{
"groupWhatsId": "120363319748513635",
"lastChatTime": "",
"groupName": "API SocialEpoch",
"groupAdministrator": ["628888777959"],
"groupDesc": "",
"groupType": 1,
"parentGroupId": "",
"languageTag": "",
"serialNumber": "",
"remark": "",
"createBy": ""
},
{
"groupWhatsId": "120363329406583946",
"lastChatTime": "2026-06-10 10:20:18",
"groupName": "WADesk外贸沟通群-3",
"groupAdministrator": ["8615317302709", "8613563589897", "8618103105602"],
"groupDesc": "欢迎大家加入【WADesk外贸沟通群】",
"groupType": 1,
"parentGroupId": "",
"languageTag": "",
"serialNumber": "",
"remark": "",
"createBy": ""
}
],
"total": 13,
"size": 20,
"current": 1,
"pages": 1
}
}Query Community Member Information
Description
Paginated query of members in a specified community by group ID. Pagination only; no filter conditions. Company ID is taken from the request header
tenant_id. See Development Guide - Common Header Parameters for authentication.URI
/wscrm-bus-api/open/group/memberPage
Request Method
POST, Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| info | Object | Yes | Query conditions |
| current | Integer | No | Page number, default 1 |
| pageSize | Integer | No | Page size, default 20 |
info Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| groupWhatsId | String | Yes | Group ID |
- Request Example
{
"current": 1,
"pageSize": 20,
"info": {
"groupWhatsId": "120363047520944442"
}
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Status code |
| message | String | No | Description |
| data | Object | No | Data |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| total | Integer | Yes | Total records |
| size | Integer | Yes | Page size |
| current | Integer | Yes | Current page |
| pages | Integer | Yes | Total pages |
| records | array | Yes | Member list |
records Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| friendWhatsId | String | Yes | Member WhatsApp number |
| avatar | String | No | Avatar URL |
| pushName | String | No | Member display name |
| status | Integer | No | Member status: 1 in group, 2 left group |
| role | Integer | No | Member role: 1 owner, 2 admin, 3 regular member |
| countryCode | String | No | Country code |
| chatCount | Integer | No | Message count |
| lastChatTime | String | No | Last chat time, format yyyy-MM-dd HH:mm:ss |
| joinTime | String | No | Join time, format yyyy-MM-dd HH:mm:ss |
| leaveTime | String | No | Leave time, format yyyy-MM-dd HH:mm:ss |
| intoCount | Integer | No | Historical in-group count |
- Response Example
{
"code": 200,
"message": "Success",
"data": {
"records": [
{
"friendWhatsId": "8618730334344",
"avatar": "https://example.com/avatar.jpg",
"pushName": "John",
"status": 1,
"role": 1,
"countryCode": "86",
"chatCount": 15,
"lastChatTime": "2025-06-20 14:30:00",
"joinTime": "2025-01-10 09:00:00",
"leaveTime": null,
"intoCount": 1
}
],
"total": 1,
"size": 20,
"current": 1,
"pages": 1
}
}Group Behavior Tracking Notification
When WhatsApp triggers the join/leave group action, it actively pushes notifications containing the logs of members joining or leaving.
WebHook
Configuration ID <GROUP_IN_OR_OUT_GROUP>
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| accessToken | String | Yes | Signed token string token |
| tenantId | int | Yes | Company ID |
| timestamp | Long | Yes | Millisecond timestamp |
| data | List | Yes | Format[{},{}], detailed as below (number of records 0-50 |
data Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Data id identifier (uuid) |
| friendWhatsId | String | Yes | WhatsApp phone number |
| actionType | int | Yes | 1 join group 2 leave group |
| createTime | String | Yes | Operation time, join time or leave time |
| groupWhatsId | String | Yes | Group ID |
| groupLink | String | No | Group link |
| dataType | int | Yes | Whether it is virtual data: data type 1 real 2 virtual |
- Request Example
{
"accessToken": "e6e18763d8d5a756d45c01486d7ad6742152ac",
"callBackUrl": "host/wscrm-bus-api/part/callback/groupAction",
"tenantId": 1238,
"timestamp": 1667295870936,
"data": [
{
"id": "30e873ab8f4840e2b610c414fe967327",
"friendWhatsId": "8617633819542",
"actionType": 1,
"create_time": "2023-02-01 00:00:00",
"groupWhatsId": "120xxxxx",
"dataType": 1,
"groupLink": "https://chat.xxx.com/CEwwCoiy7Qa1MVKex3x4p4"
}
]
}- Response Example
{
"code": 200,
"message": "Success",
"data": ""
}