---
url: /apidocs/social.md
---
## Social API

| Endpoint | Method | Description |
|-----|-----|-----|
| [social:sendRequest](#send-friend-request) | websocket | Send friend request |
| [social:acceptRequest](#accept-friend-request) | websocket | Accept friend request |
| [social:declineRequest](#decline-friend-request) | websocket | Decline friend request |
| [social:deleteRequest](#delete-friend-request) | websocket | Delete friend request |
| ~~[social:searchFriends](#search-friends)~~ | websocket | Search friends |
| [social:searchUserFriends](#search-user-friends) | websocket | Search user friends |
| [social:deleteFriend](#delete-friend) | websocket | Delete friend |
| [social:searchUsers](#search-users) | websocket | Search users |
| [social:searchSimpleUsers](#search-simple-users) | websocket | Search simple users |
| [social:searchSimpleUsersForGroup](#search-simple-users-for-group) | websocket | Search simple users for group |
| [social:searchFriendsForGroup](#search-friends-for-group) | websocket | Search friends for group |
| [social:searchSimpleUsersForCommunity](#search-simple-users-for-community) | websocket | Search simple users for community |
| [social:searchFriendsForCommunity](#search-friends-for-community) | websocket | Search friends for community |
| [social:searchUsersByContacts](#search-users-by-contacts) | websocket | Search users by contacts |
| [social:searchUsersByBadgeId](#search-users-by-badge-id) | websocket | Search users by badge id |
| [social:getUserSimpleInfo](#get-user-simple-info) | websocket | Get user simple info |
| [social:getUserByVerusName](#get-user-by-verus-name) | websocket | Get user by verus name |
| [social:getUserByVerusIAddress](#get-user-by-verus-i-address) | websocket | Get user by verus i address |
| [social:getVerusIdentityOfUser](#get-verus-identity-of-user) | websocket | Get verus identity of user |
| [social:getUserProfileInfo](#get-user-profile-info) | websocket | Get user profile info |
| [social:getUsersSimpleInfo](#get-users-simple-info) | websocket | Get users simple info |
| [social:getSuggestedFriends](#get-suggested-friends) | websocket | Get suggested friends |
| [social:emailFriendRequest](#friend-request-by-email) | websocket | Friend request by email |
| [social:shareContactsWithUser](#share-contacts-with-user) | websocket | Share contacts with user |
| [social:shareContactsWithBoothOwners](#share-contacts-with-booth-owners) | websocket | Share contacts with booth owners |
| [social:followUser](#follow-user) | websocket | Follow user |
| [social:unfollowUser](#unfollow-user) | websocket | Unfollow user |
| [social:searchUserFollowers](#search-user-followers) | websocket | Search user followers |
| [social:searchUserFollowings](#search-user-followings) | websocket | Search user followings |
| [social:friendAdded](#friend-added-event) | websocketEvent | Friend added event |
| [social:friendDeleted](#friend-deleted-event) | websocketEvent | Friend deleted event |
| [social:followingStatusChanged](#following-status-changed-event) | websocketEvent | Following status changed event |
| [social:followerStatusChanged](#follower-status-changed-event) | websocketEvent | Follower status changed event |

### Send friend request

**Method:** websocket

**Endpoint:** social:sendRequest

**Description:** Api does not create duplicated requests. It ignores request if it was sent before. It accepts request if it was received before. It returns 4003 status code if users are already friends.

**Request:**

**Response:**

### Accept friend request

**Method:** websocket

**Endpoint:** social:acceptRequest

**Request:**

**Response:**

### Decline friend request

**Method:** websocket

**Endpoint:** social:declineRequest

**Request:**

**Response:**

### Delete friend request

**Method:** websocket

**Endpoint:** social:deleteRequest

**Request:**

**Response:**

### Search friends

**Method:** websocket

**Endpoint:** social:searchFriends

**DEPRECATED**

**Description:** Deprecated, use social:searchUserFriends instead.

**Request:**

**Response:**

### Search user friends

**Method:** websocket

**Endpoint:** social:searchUserFriends

**Description:** Friend list is ordered by first, last name

**Request:**

**Response:**

### Delete friend

**Method:** websocket

**Endpoint:** social:deleteFriend

**Request:**

**Response:**

### Search users

**Method:** websocket

**Endpoint:** social:searchUsers

**Description:** API returns list of users found by provided query. API additionally requests publicRoomCount and contactCount for each resulting user. Use `social:searchSimpleUsers` if counts are not required.

**Request:**

**Response:**

### Search simple users

**Method:** websocket

**Endpoint:** social:searchSimpleUsers

**Description:** API returns list of users found by provided query.

**Request:**

**Response:**

### Search simple users for group

**Method:** websocket

**Endpoint:** social:searchSimpleUsersForGroup

**Description:** API returns list of users found by provided query, with each user's role in the specified group (Admin / Moderator / Participant / empty if not a member).

**Request:**

**Response:**

### Search friends for group

**Method:** websocket

**Endpoint:** social:searchFriendsForGroup

**Description:** Friend list is ordered by first, last name. Each user includes their role in the specified group (Admin / Moderator / Participant / empty if not a member).

**Request:**

**Response:**

### Search simple users for community

**Method:** websocket

**Endpoint:** social:searchSimpleUsersForCommunity

**Description:** API returns list of users found by provided query, with each user's role in the specified community (Admin / Moderator / Participant / empty if not a member).

**Request:**

**Response:**

### Search friends for community

**Method:** websocket

**Endpoint:** social:searchFriendsForCommunity

**Description:** Friend list is ordered by first, last name. Each user includes their role in the specified community (Admin / Moderator / Participant / empty if not a member).

**Request:**

**Response:**

### Search users by contacts

**Method:** websocket

**Endpoint:** social:searchUsersByContacts

**Request:**

**Response:**

### Search users by badge id

**Method:** websocket

**Endpoint:** social:searchUsersByBadgeId

**Description:** API returns list of users holding the given badge, optionally filtered by query.

**Request:**

**Response:**

### Get user simple info

**Method:** websocket

**Endpoint:** social:getUserSimpleInfo

**Description:** Returns simple user info.

**Request:**

**Response:**

### Get user by verus name

**Method:** websocket

**Endpoint:** social:getUserByVerusName

**Description:** Returns simple user info by verus name.

**Request:**

**Response:**

### Get user by verus i address

**Method:** websocket

**Endpoint:** social:getUserByVerusIAddress

**Description:** Returns simple user info by verus identity IAddress.

**Request:**

**Response:**

### Get verus identity of user

**Method:** websocket

**Endpoint:** social:getVerusIdentityOfUser

**Description:** Returns Verus identity by user id.

**Request:**

**Response:**

### Get user profile info

**Method:** websocket

**Endpoint:** social:getUserProfileInfo

**Description:** Returns extended user info for profile page.

Counts user visit, subtracts token from source user and adds token to target user.

**Request:**

**Response:**

### Get users simple info

**Method:** websocket

**Endpoint:** social:getUsersSimpleInfo

**Description:** Returns list of simple user infos.

**Request:**

**Response:**

### Get suggested friends

**Method:** websocket

**Endpoint:** social:getSuggestedFriends

**Description:** Returns users that have most friends in common with current user. If suggested friend list is empty - returns social:searchUsers result.

**Request:**

**Response:**

### Friend request by email

**Method:** websocket

**Endpoint:** social:emailFriendRequest

**Description:** Function sends friend request email to target address. In addition, if target user exists - creates friend request.

**Request:**

**Response:**

### Share contacts with user

**Method:** websocket

**Endpoint:** social:shareContactsWithUser

**Description:** UserA can share its contacts (email/phone) with UserB, so UserB could see this data in UserA profile page.

**Request:**

**Response:**

### Share contacts with booth owners

**Method:** websocket

**Endpoint:** social:shareContactsWithBoothOwners

**Description:** Api sends email to booth owners with current user information (email, first/last name, company name/title)

**Request:**

**Response:**

### Follow user

**Method:** websocket

**Endpoint:** social:followUser

**Request:**

**Response:**

### Unfollow user

**Method:** websocket

**Endpoint:** social:unfollowUser

**Request:**

**Response:**

### Search user followers

**Method:** websocket

**Endpoint:** social:searchUserFollowers

**Description:** Api returns people who are following current user. Followers are ordered by follow date, most recent followers are first in the list.

**Request:**

**Response:**

### Search user followings

**Method:** websocket

**Endpoint:** social:searchUserFollowings

**Description:** Api returns people who are being followed by current user. Followings are ordered by follow date, most recent followings are first in the list.

**Request:**

**Response:**

### Friend added event

**Event:** social:friendAdded

**Data:**

### Friend deleted event

**Event:** social:friendDeleted

**Data:**

### Following status changed event

**Event:** social:followingStatusChanged

**Data:**

### Follower status changed event

**Event:** social:followerStatusChanged

**Data:**

## Models

#### User Simple
