Community API
Community API handles communities and community channels (posts and discussions).
| Endpoint | Method | Description |
|---|---|---|
| community:createCommunity | websocket | Create community |
| community:deleteCommunity | websocket | Delete community |
| community:updateCommunity | websocket | Update community |
| community:searchOpenCommunities | websocket | Search open communities |
| community:searchUserCommunities | websocket | Search user communities |
| community:getInfoAndSubscribe | websocket | Get community info and subscribe |
| community:joinCommunity | websocket | Join community |
| community:inviteToCommunity | websocket | Invite to community |
| community:createCommunityChannel | websocket | Create community channel |
| community:deleteCommunityChannel | websocket | Delete community channel |
| community:updateCommunityChannel | websocket | Update community channel |
| community:searchCommunityChannels | websocket | Search community channels |
| community:getChannelInfoAndSubscribe | websocket | Get community channel info and subscribe |
| websocket | Create community channel post | |
| websocket | Delete community channel post | |
| websocket | Edit community channel post | |
| websocket | List community channel posts | |
| websocket | List community channel comments | |
| websocket | List community channel thread comments | |
| websocket | Set vote for community channel post | |
| websocket | Set vote for community channel comment | |
| websocket | Set vote for community message | |
| community:onChannelCreated | websocketEvent | On community channel created event |
| community:onChannelDeleted | websocketEvent | On community channel deleted event |
| community:onChannelUpdated | websocketEvent | On community channel created updated |
| websocketEvent | On community channel post created event | |
| websocketEvent | On community channel post deleted event | |
| websocketEvent | On community channel post updated event |
Create community
Method: websocket
Endpoint: community:createCommunity
Request:
{
"data": {
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"thumbnailId": string // must be pre-uploaded using upload session
"createEventsChannel": bool // if true, automatically creates events channel for community
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"community": {
"communityId": string
"created": timestamp
"networkId": string
"thumbnailId": string
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"channelCounter": int
}
}
"error": { "status": bool, "code": int, "message": string }
}
Delete community
Method: websocket
Endpoint: community:deleteCommunity
Request:
{
"data": {
"communityId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Update community
Method: websocket
Endpoint: community:updateCommunity
Request:
{
"data": {
"communityId": string
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"thumbnailId": string // must be pre-uploaded using upload session
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Search open communities
Method: websocket
Endpoint: community:searchOpenCommunities
Request:
{
"data": {
"query": string // search query
"afterCommunityId": string // pagination cursor, get communities after given id
"limit": int // max number of communities to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"communities": [{
"communityId": string
"created": timestamp
"networkId": string
"thumbnailId": string
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"channelCounter": int
}]
"hasNext": bool // there are more communities to fetch
}
"error": { "status": bool, "code": int, "message": string }
}
Search user communities
Method: websocket
Endpoint: community:searchUserCommunities
Request:
{
"data": {
"query": string // search query
"afterCommunityId": string // pagination cursor, get communities after given id
"limit": int // max number of communities to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"communities": [{
"communityId": string
"created": timestamp
"networkId": string
"thumbnailId": string
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"channelCounter": int
}]
"hasNext": bool // there are more communities to fetch
}
"error": { "status": bool, "code": int, "message": string }
}
Get community info and subscribe
Method: websocket
Endpoint: community:getInfoAndSubscribe
Description: Api returns community info and subscribes user to community events.
Request:
{
"data": {
"communityId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"community": {
"communityId": string
"created": timestamp
"networkId": string
"thumbnailId": string
"communityTitle": string
"communitySettings": {
"joinPolicy": string // OpenForAll / ByInvitation
}
"channelCounter": int
}
"communityRole": string // Admin / Participant
}
"error": { "status": bool, "code": int, "message": string }
}
Join community
Method: websocket
Endpoint: community:joinCommunity
Request:
{
"data": {
"communityId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Invite to community
Method: websocket
Endpoint: community:inviteToCommunity
Request:
{
"data": {
"targetUserId": string
"communityId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Create community channel
Method: websocket
Endpoint: community:createCommunityChannel
Request:
{
"data": {
"communityId": string
"title": string
"contentDirectoryId": string // content directory id for the channel, attachments will belong there
"settings": {
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"channel": { // community textchat channel
"sourceString": string // textchat channel belonging source
"channelId": string // textchat channel id
"title": string // channel title
"settings": map[string]{ custom structure } // channel settings, like permissions for community channel
"contentDirectoryId": string // content directory resource id, for CMS
"options": [ string ] // additional options for a channel, like 'events' or 'booth'
"lastEpoch": int // last encryption epoch number for a channel
"needNewEpoch": bool // flag to point that channel encryption epoch should be changed on next message
"thumbnailId": string // channel thumbnail resource id
"totalCount": int // total count of messages in a channel
"unreadCount": int // count of unread messages for current participant / not returned if empty
"subChannelCount": int // amount of first level subchannels in a channel (if present)
"lastReadTs": timestamp // last read timestamp for current participant / not returned if empty
"opponentLastReadTs": timestamp // last read timestamp for opponent (only for direct channels) / not returned if empty
"lastMessage": { // last message in a channel / not returned if empty
"messageId": string
"created": timestamp
"authorId": string
"authorName": string
"messageBody": string
"messageContentType": int // 0 - text, 1 - blocked, 2 - deleted, 3 - request JSON, 4 - endorsement JSON, 5 - activity JSON, 6 - card JSON, 7 - system JSON, 8 - poll, 9 - forward, 10 - file attachment, 11 - image, 12 - video, 13 - audio
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"isHighAlert": bool // is channel set on high alert
"isPinned": bool // indicates if the channel was pinned by the user
}
"settings": { // community channel settings
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
}
"error": { "status": bool, "code": int, "message": string }
}
Delete community channel
Method: websocket
Endpoint: community:deleteCommunityChannel
Request:
{
"data": {
"communityId": string
"channelId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Update community channel
Method: websocket
Endpoint: community:updateCommunityChannel
Request:
{
"data": {
"communityId": string
"channelId": string
"title": string
"settings": {
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Search community channels
Method: websocket
Endpoint: community:searchCommunityChannels
Request:
{
"data": {
"communityId": string
"query": string // search query
"afterChannelId": string // pagination cursor, get channels after this channel id
"limit": int // max number of channels to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"channels": [{
"sourceString": string // textchat channel belonging source
"channelId": string // textchat channel id
"title": string // channel title
"settings": map[string]{ custom structure } // channel settings, like permissions for community channel
"contentDirectoryId": string // content directory resource id, for CMS
"options": [ string ] // additional options for a channel, like 'events' or 'booth'
"lastEpoch": int // last encryption epoch number for a channel
"needNewEpoch": bool // flag to point that channel encryption epoch should be changed on next message
"thumbnailId": string // channel thumbnail resource id
"totalCount": int // total count of messages in a channel
"unreadCount": int // count of unread messages for current participant / not returned if empty
"subChannelCount": int // amount of first level subchannels in a channel (if present)
"lastReadTs": timestamp // last read timestamp for current participant / not returned if empty
"opponentLastReadTs": timestamp // last read timestamp for opponent (only for direct channels) / not returned if empty
"lastMessage": { // last message in a channel / not returned if empty
"messageId": string
"created": timestamp
"authorId": string
"authorName": string
"messageBody": string
"messageContentType": int // 0 - text, 1 - blocked, 2 - deleted, 3 - request JSON, 4 - endorsement JSON, 5 - activity JSON, 6 - card JSON, 7 - system JSON, 8 - poll, 9 - forward, 10 - file attachment, 11 - image, 12 - video, 13 - audio
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"isHighAlert": bool // is channel set on high alert
"isPinned": bool // indicates if the channel was pinned by the user
}]
"total": int // total amount of channels
"hasNext": bool // there are more channels to fetch
}
"error": { "status": bool, "code": int, "message": string }
}
Get community channel info and subscribe
Method: websocket
Endpoint: community:getChannelInfoAndSubscribe
Description: Api returns community channel info and subscribes user to community channel events.
Request:
{
"data": {
"communityId": string
"channelId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"channel": { // community textchat channel
"sourceString": string // textchat channel belonging source
"channelId": string // textchat channel id
"title": string // channel title
"settings": map[string]{ custom structure } // channel settings, like permissions for community channel
"contentDirectoryId": string // content directory resource id, for CMS
"options": [ string ] // additional options for a channel, like 'events' or 'booth'
"lastEpoch": int // last encryption epoch number for a channel
"needNewEpoch": bool // flag to point that channel encryption epoch should be changed on next message
"thumbnailId": string // channel thumbnail resource id
"totalCount": int // total count of messages in a channel
"unreadCount": int // count of unread messages for current participant / not returned if empty
"subChannelCount": int // amount of first level subchannels in a channel (if present)
"lastReadTs": timestamp // last read timestamp for current participant / not returned if empty
"opponentLastReadTs": timestamp // last read timestamp for opponent (only for direct channels) / not returned if empty
"lastMessage": { // last message in a channel / not returned if empty
"messageId": string
"created": timestamp
"authorId": string
"authorName": string
"messageBody": string
"messageContentType": int // 0 - text, 1 - blocked, 2 - deleted, 3 - request JSON, 4 - endorsement JSON, 5 - activity JSON, 6 - card JSON, 7 - system JSON, 8 - poll, 9 - forward, 10 - file attachment, 11 - image, 12 - video, 13 - audio
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"isHighAlert": bool // is channel set on high alert
"isPinned": bool // indicates if the channel was pinned by the user
}
"settings": { // community channel settings
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
"communityRole": string // Admin / Participant
}
"error": { "status": bool, "code": int, "message": string }
}
Create community channel post
Method: websocket
Endpoint: community:createCommunityChannelPost
DEPRECATED
Description: DEPRECATED, use channel:createMessage instead.
Request:
{
"data": {
"channelId": string // textchat channel id
"messageBody": string // content of message
"messageTitle": string // message title (for posts)
"messageType": int // type of message
"attachmentIds": [ string ] // ids of resources that will be attached to the message (must be pre-uploaded using upload session)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"message": {
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
}
"error": { "status": bool, "code": int, "message": string }
}
Delete community channel post
Method: websocket
Endpoint: community:deleteCommunityChannelPost
DEPRECATED
Description: DEPRECATED, use channel:deleteMessageFromChannel instead.
Request:
{
"data": {
"channelId": string
"messageId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Edit community channel post
Method: websocket
Endpoint: community:editCommunityChannelPost
DEPRECATED
Description: DEPRECATED, use channel:editMessageBody instead.
Request:
{
"data": {
"channelId": string
"messageId": string
"messageBody": string
"messageTitle": string
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
List community channel posts
Method: websocket
Endpoint: community:listCommunityChannelPosts
DEPRECATED
Description: DEPRECATED, use channel:listMessagesWithEngagement instead.
Request:
{
"data": {
"channelId": string // textchat channel id
"subChannelId": string // fetch messages sent to subchannel
"messagesFilter": string // all/allAI/openAI/ravAI
"beforeMessageId": string // deprecated. pagination cursor, get messages before this message id
"afterMessageId": string // deprecated. pagination cursor, get messages after this message id
"messageId": string // pagination cursor, skip to start from the beginning
"direction": string // pagination direction: before (default), after, bilateral
"limit": int // max number of messages to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"messages": [{
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"hasNext": bool // true if channel has newer messages and 'afterMessageId' cursor applied
"hasPrevious": bool // true if channel has older messages and 'afterMessageId' cursor not applied
"total": int // total amount of channel messages
"channelSource": string // channel source (belonging) string
"userVotes": map[string]int // user votes per message id (if set)
}
"error": { "status": bool, "code": int, "message": string }
}
List community channel comments
Method: websocket
Endpoint: community:listCommunityChannelComments
DEPRECATED
Description: DEPRECATED, use channel:listMessagesWithEngagement instead.
Request:
{
"data": {
"channelId": string // textchat channel id
"subChannelId": string // fetch messages sent to subchannel
"messagesFilter": string // all/allAI/openAI/ravAI
"beforeMessageId": string // deprecated. pagination cursor, get messages before this message id
"afterMessageId": string // deprecated. pagination cursor, get messages after this message id
"messageId": string // pagination cursor, skip to start from the beginning
"direction": string // pagination direction: before (default), after, bilateral
"limit": int // max number of messages to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"messages": [{
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"hasNext": bool // true if channel has newer messages and 'afterMessageId' cursor applied
"hasPrevious": bool // true if channel has older messages and 'afterMessageId' cursor not applied
"total": int // total amount of channel messages
"channelSource": string // channel source (belonging) string
"userVotes": map[string]int // user votes per message id (if set)
}
"error": { "status": bool, "code": int, "message": string }
}
List community channel thread comments
Method: websocket
Endpoint: community:listCommunityChannelThreadComments
DEPRECATED
Description: DEPRECATED, use channel:listMessagesWithEngagement instead.
Request:
{
"data": {
"channelId": string // textchat channel id
"subChannelId": string // fetch messages sent to subchannel
"messagesFilter": string // all/allAI/openAI/ravAI
"beforeMessageId": string // deprecated. pagination cursor, get messages before this message id
"afterMessageId": string // deprecated. pagination cursor, get messages after this message id
"messageId": string // pagination cursor, skip to start from the beginning
"direction": string // pagination direction: before (default), after, bilateral
"limit": int // max number of messages to return (1-100)
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"messages": [{
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"hasNext": bool // true if channel has newer messages and 'afterMessageId' cursor applied
"hasPrevious": bool // true if channel has older messages and 'afterMessageId' cursor not applied
"total": int // total amount of channel messages
"channelSource": string // channel source (belonging) string
"userVotes": map[string]int // user votes per message id (if set)
}
"error": { "status": bool, "code": int, "message": string }
}
Set vote for community channel post
Method: websocket
Endpoint: community:setVoteForCommunityChannelPost
DEPRECATED
Description: DEPRECATED, use channel:setVoteForMessage instead.
Request:
{
"data": {
"channelId": string
"messageId": string
"voteStatus": int // up = 1, down = -1, none = 0
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Set vote for community channel comment
Method: websocket
Endpoint: community:setVoteForCommunityChannelComment
DEPRECATED
Description: DEPRECATED, use channel:setVoteForMessage instead.
Request:
{
"data": {
"channelId": string
"messageId": string
"voteStatus": int // up = 1, down = -1, none = 0
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Set vote for community message
Method: websocket
Endpoint: community:setVoteForCommunityMessage
DEPRECATED
Description: DEPRECATED, use channel:setVoteForMessage instead.
Request:
{
"data": {
"channelId": string
"messageId": string
"voteStatus": int // up = 1, down = -1, none = 0
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
On community channel created event
Event: community:onChannelCreated
Description: Event is triggered when a new channels is created in a community.
Data:
{
"data": {
"channel": { // community textchat channel
"sourceString": string // textchat channel belonging source
"channelId": string // textchat channel id
"title": string // channel title
"settings": map[string]{ custom structure } // channel settings, like permissions for community channel
"contentDirectoryId": string // content directory resource id, for CMS
"options": [ string ] // additional options for a channel, like 'events' or 'booth'
"lastEpoch": int // last encryption epoch number for a channel
"needNewEpoch": bool // flag to point that channel encryption epoch should be changed on next message
"thumbnailId": string // channel thumbnail resource id
"totalCount": int // total count of messages in a channel
"unreadCount": int // count of unread messages for current participant / not returned if empty
"subChannelCount": int // amount of first level subchannels in a channel (if present)
"lastReadTs": timestamp // last read timestamp for current participant / not returned if empty
"opponentLastReadTs": timestamp // last read timestamp for opponent (only for direct channels) / not returned if empty
"lastMessage": { // last message in a channel / not returned if empty
"messageId": string
"created": timestamp
"authorId": string
"authorName": string
"messageBody": string
"messageContentType": int // 0 - text, 1 - blocked, 2 - deleted, 3 - request JSON, 4 - endorsement JSON, 5 - activity JSON, 6 - card JSON, 7 - system JSON, 8 - poll, 9 - forward, 10 - file attachment, 11 - image, 12 - video, 13 - audio
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"isHighAlert": bool // is channel set on high alert
"isPinned": bool // indicates if the channel was pinned by the user
}
"settings": { // community channel settings
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
}
"error": { "status": bool, "code": int, "message": string }
}
On community channel deleted event
Event: community:onChannelDeleted
Description: Event is triggered when a channel is deleted in a community.
Data:
{
"data": {
"communityId": string
"channelId": string
}
"error": { "status": bool, "code": int, "message": string }
}
On community channel created updated
Event: community:onChannelUpdated
Description: Event is triggered when a new channels is created in a community.
Data:
{
"data": {
"channel": { // community textchat channel
"sourceString": string // textchat channel belonging source
"channelId": string // textchat channel id
"title": string // channel title
"settings": map[string]{ custom structure } // channel settings, like permissions for community channel
"contentDirectoryId": string // content directory resource id, for CMS
"options": [ string ] // additional options for a channel, like 'events' or 'booth'
"lastEpoch": int // last encryption epoch number for a channel
"needNewEpoch": bool // flag to point that channel encryption epoch should be changed on next message
"thumbnailId": string // channel thumbnail resource id
"totalCount": int // total count of messages in a channel
"unreadCount": int // count of unread messages for current participant / not returned if empty
"subChannelCount": int // amount of first level subchannels in a channel (if present)
"lastReadTs": timestamp // last read timestamp for current participant / not returned if empty
"opponentLastReadTs": timestamp // last read timestamp for opponent (only for direct channels) / not returned if empty
"lastMessage": { // last message in a channel / not returned if empty
"messageId": string
"created": timestamp
"authorId": string
"authorName": string
"messageBody": string
"messageContentType": int // 0 - text, 1 - blocked, 2 - deleted, 3 - request JSON, 4 - endorsement JSON, 5 - activity JSON, 6 - card JSON, 7 - system JSON, 8 - poll, 9 - forward, 10 - file attachment, 11 - image, 12 - video, 13 - audio
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"isHighAlert": bool // is channel set on high alert
"isPinned": bool // indicates if the channel was pinned by the user
}
"settings": { // community channel settings
"beneficiaryVerus": string // identity name to receive donations
"writePolicy": string // who can post (All/Admin)
"joinPolicy": string // who can join (OpenForAll)
}
}
"error": { "status": bool, "code": int, "message": string }
}
On community channel post created event
Event: community:onChannelPostCreated
DEPRECATED
Description: DEPRECATED, use channel:onMessageCreated instead.
Data:
{
"data": {
"communityId": string
"channelId": string
"message": {
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
}
"error": { "status": bool, "code": int, "message": string }
}
On community channel post deleted event
Event: community:onChannelPostDeleted
DEPRECATED
Description: DEPRECATED, use channel:onMessageDeleted instead.
Data:
{
"data": {
"communityId": string
"channelId": string
"messageId": string
}
"error": { "status": bool, "code": int, "message": string }
}
On community channel post updated event
Event: community:onChannelPostUpdated
DEPRECATED
Description: Event is triggered when a message is updated in a community channel. DEPRECATED, use channel:onMessageEdited instead.
Data:
{
"data": {
"communityId": string
"channelId": string
"message": {
"channelId": string
"bucketId": string
"messageId": string
"authorId": string
"networkId": string
"created": timestamp
"updated": timestamp
"messageType": int // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
"messageBody": string
"messageTitle": string
"isBlocked": bool
"isDeleted": bool
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"replyMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"forwardMessage": {
"channelId": string
"messageId": string
"authorId": string
"created": timestamp
"messageType": int
"messageBody": string
"attachments": [{
"resourceId": string
"fileName": string
"fileSize": int
"contentType": string
"durationFloat": float
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}]
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
"subChannelPath": string
"subChannelTitles": [ string ]
"options": [ string ]
"reactions": {
"counters": [{ // counter per reaction, in descending order
"emoji": string
"count": int
}]
"userEmoji": string // user's emoji reaction to the message
}
"pollId": string
"userPoll": {
"poll": { // channel's poll
"id": string
"channelId": string // the channel the poll is in
"question": string // question/description of the poll
"isMultiSelect": bool // allow the users to select multiple choices
"isAnonymous": bool // can users see who voted for what
"created": timestamp // the time when poll was created
"closingTime": timestamp // users cannot vote after the closing time, defaults to one day
"options": [ string ] // list of options which the channel users vote for
"voteCounters": [ int ] // calculated number of votes per option respectively
}
"vote": { // user's vote in the poll'
"pollId": string
"userId": string
"options": [ string ] // list of options the user voted for
}
}
"threadChannelId": string
"threadMessageCount": int
"viewCount": int
"upVoteCount": int
"downVoteCount": int
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
}
}
"error": { "status": bool, "code": int, "message": string }
}