Group API
| Endpoint | Method | Description |
|---|---|---|
| group:createGroup | websocket | Create group |
| group:deleteGroup | websocket | Delete group |
| group:updateGroup | websocket | Update group |
| group:getGroup | websocket | Get group |
| group:addGroupMembers | websocket | Add group members |
| group:deleteGroupMembers | websocket | Delete group members |
| group:updateMemberRole | websocket | Update member role |
| group:searchUserGroups | websocket | Search user groups |
| group:searchGroupMembers | websocket | Search group members |
Create group
Method: websocket
Endpoint: group:createGroup
Request:
{
"data": {
"groupName": string
"groupType": uint32
"thumbnailId": string
"memberUserIds": [ string ]
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"group": {
"groupId": string
"groupName": string
"groupType": uint32
"created": timestamp
"networkId": string
"thumbnailId": string
"membersCount": int
"userId": string
"joined": timestamp
"groupRole": string // Admin / Participant
}
}
"error": { "status": bool, "code": int, "message": string }
}
Delete group
Method: websocket
Endpoint: group:deleteGroup
Request:
{
"data": {
"groupId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Update group
Method: websocket
Endpoint: group:updateGroup
Request:
{
"data": {
"groupId": string
"groupName": string
"groupType": uint32
"thumbnailId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Get group
Method: websocket
Endpoint: group:getGroup
Request:
{
"data": {
"groupId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"group": {
"groupId": string
"groupName": string
"groupType": uint32
"created": timestamp
"networkId": string
"thumbnailId": string
"membersCount": int
"userId": string
"joined": timestamp
"groupRole": string // Admin / Participant
}
}
"error": { "status": bool, "code": int, "message": string }
}
Add group members
Method: websocket
Endpoint: group:addGroupMembers
Request:
{
"data": {
"groupId": string
"memberUserIds": [ string ]
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Delete group members
Method: websocket
Endpoint: group:deleteGroupMembers
Request:
{
"data": {
"groupId": string
"memberUserIds": [ string ]
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Update member role
Method: websocket
Endpoint: group:updateMemberRole
Request:
{
"data": {
"groupId": string
"memberId": string
"groupRole": string // Admin / Participant
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Search user groups
Method: websocket
Endpoint: group:searchUserGroups
Request:
{
"data": {
"query": string // search query
"cursor": string // pagination cursor, skip previous search results
"limit": int // maximum amount to return
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"searchResult": [{
"groupId": string
"groupName": string
"groupType": uint32
"created": timestamp
"networkId": string
"thumbnailId": string
"membersCount": int
"userId": string
"joined": timestamp
"groupRole": string // Admin / Participant
}]
"cursor": string // pagination cursor, use for fetching next page
"hasMore": bool // indication if there are more items available for search
}
"error": { "status": bool, "code": int, "message": string }
}
Search group members
Method: websocket
Endpoint: group:searchGroupMembers
Request:
{
"data": {
"groupId": string
"query": string // search query
"cursor": string // pagination cursor, skip previous search results
"limit": int // maximum amount to return
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"searchResult": [{
"user": { user simple structure }
"groupRole": string // Admin / Participant
"joined": timestamp
}]
"cursor": string // pagination cursor, use for fetching next page
"hasMore": bool // indication if there are more items available for search
}
"error": { "status": bool, "code": int, "message": string }
}
Models
User Simple
{
"id": string
"firstName": string
"lastName": string
"privacyMode": int // 0 - Default, 1 - Incognito
"avatar": string
"avatar3D": { // field is not returned if empty
"assetId": string
"assetSkins": map[string]string // map of selected skins per variants
"avatarUrl": string // url to gbl file (Ready Player Me)
"avatarUserId": string // user id for session recovery (Ready Player Me)
}
"companyName": string // name of company that user represents
"companyTitle": string // user title in the company
}