Skip to content
On this page

Channel API ​

Channel API handles textchat conversations between users.

EndpointMethodDescription
/api/v0/channel/listMessages/{channelId}webRequestList channel messages (web request)
channel:getDirectChannelwebsocketGet direct channel
channel:getChannelForRoomwebsocketGet channel for room
channel:getChannelForPropwebsocketGet channel for prop
channel:getChannelForDirectAIwebsocketGet channel for direct aI
channel:getChannelForRoomAIwebsocketGet channel for room aI
channel:spawnDirectAIAgentChannelwebsocketSpawn direct aI agent channel
channel:getUserNotesChannelwebsocketGet user notes channel
channel:getGroupChannelwebsocketGet group channel
channel:getChannelForCommunityPostwebsocketGet channel for community post
channel:getChannelForUserPostswebsocketGet channel for user posts
channel:getThreadChannelForMessagewebsocketGet thread channel for message
channel:getChannelBySourcewebsocketGet channel by source
channel:getChannelByIdwebsocketGet channel by id
channel:searchUserChannelswebsocketSearch user channels
channel:getCountOfUnreadChannelswebsocketGet count of unread channels
channel:deleteSpawnChannelwebsocketDelete spawn channel
channel:updateTitlewebsocketUpdate channel title
channel:setHighAlertwebsocketSet channel to high alert
channel:pinwebsocketPin channel
channel:createMessagewebsocketCreate channel message
channel:editMessageBodywebsocketEdit channel message body
channel:addMessageAttachmentswebsocketAdd channel message attachments
channel:deleteMessageAttachmentswebsocketDelete channel message attachments
channel:blockMessagewebsocketBlock channel message
channel:unblockMessagewebsocketUnblock channel message
channel:deleteMessagewebsocketDelete channel message
channel:restoreMessagewebsocketRestore channel message
channel:updateMessageDeletedStatuswebsocketUpdate channel message deleted status
channel:deleteMessageFromChannelwebsocketDelete message from channel
channel:generateAIWelcomeMessagewebsocketGenerate aI welcome message
channel:getLastMessagewebsocketGet last channel message
channel:listMessageswebsocketList channel messages
channel:listMessagesWithEngagementwebsocketList channel messages with engagement
channel:searchMessageswebsocketSearch channel messages
channel:setChannelLastReadMessagewebsocketSet channel last read message
channel:setVoteForMessagewebsocketSet vote for channel message
channel:createPollMessagewebsocketCreate channel poll message
channel:postPollVotewebsocketPost poll vote
channel:getPollStatswebsocketGet poll stats
channel:reactToMessagewebsocketReact to message
channel:listUsersReactedToMessagewebsocketList users reacted to message
channel:searchAttachmentsOfChannelwebsocketSearch attachments of channel
channel:createSubChannelwebsocketCreate sub channel
channel:deleteSubChannelwebsocketDelete sub channel
channel:updateSubChannelwebsocketUpdate sub channel
channel:listSubChannelswebsocketList sub channels
channel:getSubChannelAndParentswebsocketGet sub channel and parents
channel:getZAddressesForParticipantswebsocketGet z addresses for channel participants
channel:createEncryptionEpochwebsocketCreate channel encryption epoch
channel:updateEncryptionEpochwebsocketUpdate channel encryption epoch
channel:listEncryptionEpocheswebsocketList channel encryption epoches
channel:listEncryptionEpochesByTupleswebsocketList channel encryption epoches by tuples
channel:listEncryptionEpochesByZAddresswebsocketList channel encryption epoches by z address
channel:getLastEncryptionEpochwebsocketGet last channel encryption epoch
channel:requestNewEncryptionEpochwebsocketRequest new encryption epoch for channel
channel:onMessageCreatedwebsocketEventOn message created event
channel:onMessageDeletedwebsocketEventOn message deleted event
channel:onMessageEditedwebsocketEventOn message edited event
channel:onMessageBlockedStatusUpdatedwebsocketEventOn message blocked status updated event
channel:onMessageDeletedStatusUpdatedwebsocketEventOn message deleted status updated event
channel:onMessageReadwebsocketEventOn message read event
channel:onUnreadCountUpdatedwebsocketEventOn unread count updated event
channel:onMessageReactionwebsocketEventOn message reaction event
channel:onPollVotewebsocketEventOn poll vote event
channel:onSubChannelCreatedwebsocketEventOn sub channel created event
channel:onSubChannelDeletedwebsocketEventOn sub channel deleted event
channel:onSubChannelUpdatedwebsocketEventOn sub channel updated event
channel:onEpochCreatedwebsocketEventOn channel encryption epoch created event
channel:onLastEpochUpdatedwebsocketEventOn last epoch updated event

List channel messages (web request) ​

HTTP Method: GET

Path: /api/v0/channel/listMessages/

Parameters:

subChannelId: string

messageId: string

direction: string (before, after, bilateral, single)

limit: int

Request:

{ empty }

Response:

{
    "data": {
        "messages": [{
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get direct channel ​

Method: websocket

Endpoint: channel:getDirectChannel

Description: Api gets/creates direct textchat channel. Api subscribes user socket to broadcast events of channel. User can have channel with himself by putting his own user id to targetUser field.

Request:

{
    "data": {
        "targetUser": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for room ​

Method: websocket

Endpoint: channel:getChannelForRoom

Description: Api gets/creates textchat channel for room and subscribes socket to that channel. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "roomId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for prop ​

Method: websocket

Endpoint: channel:getChannelForProp

Description: Api gets/creates textchat channel for prop. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "roomId": string
        "propId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for direct aI ​

Method: websocket

Endpoint: channel:getChannelForDirectAI

Description: Api gets/creates channel for direct AI textchat. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "aiProvider": string  // openai/ravai
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for room aI ​

Method: websocket

Endpoint: channel:getChannelForRoomAI

Description: Api gets/creates channel for user AI textchat within room context. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "networkId": string
        "roomId": string
        "aiProvider": string  // openai/ravai
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Spawn direct aI agent channel ​

Method: websocket

Endpoint: channel:spawnDirectAIAgentChannel

Description: Api creates a channel spawned by an AI agent from a parent direct channel. Api subscribes user socket to broadcast events of the spawned channel. Spawned channel unread state is reflected on the parent direct channel.

Request:

{
    "data": {
        "channelId": string  // origin direct channel id for spawning
        "agentId": string  // identifier of the AI agent spawning the channel
        "title": string  // optional channel title
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get user notes channel ​

Method: websocket

Endpoint: channel:getUserNotesChannel

Description: Api gets/creates textchat channel for user notes (user chat with himself). Api subscribes user socket to broadcast events of channel.

Request:

{ empty }

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get group channel ​

Method: websocket

Endpoint: channel:getGroupChannel

Description: Api gets/creates group textchat channel. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "groupId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for community post ​

Method: websocket

Endpoint: channel:getChannelForCommunityPost

Description: Api gets/creates channel for community post discussion textchat. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "communityId": string
        "channelId": string
        "postId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel for user posts ​

Method: websocket

Endpoint: channel:getChannelForUserPosts

Description: Api gets/creates textchat channel for user posts (public channel of a user). Api subscribes user socket to broadcast events of channel.

Request:

{ empty }

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get thread channel for message ​

Method: websocket

Endpoint: channel:getThreadChannelForMessage

Description: Api gets/creates sub channel (thread) for given message. Threads are available for community posts (+comments) and user public posts (+comments). Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel by source ​

Method: websocket

Endpoint: channel:getChannelBySource

Description: Api returns textchat channel by its source. Api subscribes user socket to broadcast events of channel.

Channel source examples:

  • room:{networkId}:
  • group:{networkId}:
  • userPosts:
  • userAIAgent:{userId}:
  • communityAll:{networkId}:
  • communityAdmin:{networkId}:

Request:

{
    "data": {
        "channelSource": string  // channel source (belonging) string
        "title": string  // optional, used to set channel title on creation
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get channel by id ​

Method: websocket

Endpoint: channel:getChannelById

Description: Api returns textchat channel by its id. Api subscribes user socket to broadcast events of channel.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search user channels ​

Method: websocket

Endpoint: channel:searchUserChannels

Description: Api returns list of textchat channels depending on filters.

Api subscribes user socket to broadcast events of all channels.

Filter could be one of the following:

  • all - return all channels
  • unread - return all unread channels
  • direct - return direct channels
  • group - return all non-direct channels
  • groups - return channel for groups
  • allWithinRoom - return all non-direct channels within the room
  • rooms - return only room channels
  • noProps - return all channels (excluding prop channels)
  • spawned - return channels spawned by parent channel

Request:

{
    "data": {
        "channelsFilter": string  // all/group/groups/unread/direct/rooms/allWithinRoom/noProps/spawned
        "query": string  // search query
        "sourceId": string  // in case if filter requires some source, like room id or parent channel id
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }]
        "total": int  // total amount of channels
        "hasNext": bool  // there are more channels to fetch
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get count of unread channels ​

Method: websocket

Endpoint: channel:getCountOfUnreadChannels

Description: Api returns amount of unread textchat channels.

Request:

{ empty }

Response:

{
    "data": {
        "unreadChannelCount": int  // amount of user channels with unread messages
        "highAlertCount": int  // amount of user channels on high alert with unread messages'
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete spawn channel ​

Method: websocket

Endpoint: channel:deleteSpawnChannel

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update channel title ​

Method: websocket

Endpoint: channel:updateTitle

Request:

{
    "data": {
        "channelId": string
        "title": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Set channel to high alert ​

Method: websocket

Endpoint: channel:setHighAlert

Description: Sets the selected channel on/off high alert

Request:

{
    "data": {
        "channelId": string
        "isHighAlert": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Pin channel ​

Method: websocket

Endpoint: channel:pin

Description: pin/unpin user's channel

Request:

{
    "data": {
        "channelId": string
        "pin": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "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
            "spawnUnreadCount": int  // count of unread AI agent spawned channels from this direct channel / not returned if empty
            "spawnParentId": string  // parent channel id for spawned channel / not returned if empty
            "spawnLastMessageTs": timestamp  // timestamp of last message in spawned channels
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create channel message ​

Method: websocket

Endpoint: channel:createMessage

Description: Api creates new message in a textchat channel.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "subChannelId": string  // subchannel id, if message is sent to subchannel
        "agentId": string  // in case if message is sent by AI agent on behalf of user
        "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)
        "options": [ string ]  // custom options, like 'event:{eventId}'
        "customParams": map[string]{ custom structure }  // custom parameters provided by client
        "replyMessageId": string  // message id of origin message for reply
        "forwardChannelId": string  // channel id of origin message for forward
        "forwardMessageId": string  // message id of origin message for forward
        "forwardBody": string  // body of forwarded message
        "forwardAttachmentIds": [ string ]  // ids of link resources that will be attached to the forwarded message (must be pre-uploaded using upload session)
        "forwardEncryption": {  // encryption forwarded message body
            "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
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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 }
}

Edit channel message body ​

Method: websocket

Endpoint: channel:editMessageBody

Description: Api edits message body in a textchat channel.

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 }
}

Add channel message attachments ​

Method: websocket

Endpoint: channel:addMessageAttachments

Description: Api add attachments to a message in a textchat channel.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
        "attachmentIds": [ string ]
        "doNotUpdateDate": bool  // if true, updated date will remain unchanged
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete channel message attachments ​

Method: websocket

Endpoint: channel:deleteMessageAttachments

Description: Api deletes attachments from a message in a textchat channel.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
        "attachmentIds": [ string ]
        "doNotUpdateDate": bool  // if true, updated date will remain unchanged
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Block channel message ​

Method: websocket

Endpoint: channel:blockMessage

Description: Api blocks message in a textchat channel. Only channel manager in group channel can block message.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Unblock channel message ​

Method: websocket

Endpoint: channel:unblockMessage

Description: Api unblock blocked message in a textchat channel. Only channel manager in group channel can unblock message.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete channel message ​

Method: websocket

Endpoint: channel:deleteMessage

DEPRECATED

Description: DEPRECATED, use channel:updateMessageDeletedStatus instead.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Restore channel message ​

Method: websocket

Endpoint: channel:restoreMessage

DEPRECATED

Description: DEPRECATED, use channel:updateMessageDeletedStatus instead.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update channel message deleted status ​

Method: websocket

Endpoint: channel:updateMessageDeletedStatus

Description: Api updates deletes status for a message in a textchat channel. Only message author can restore message.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
        "isDeleted": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete message from channel ​

Method: websocket

Endpoint: channel:deleteMessageFromChannel

Description: Api completely deletes message from a textchat channel. Api is available for a limited number of channel types (community and user posts).

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Generate aI welcome message ​

Method: websocket

Endpoint: channel:generateAIWelcomeMessage

Description: Api generates welcome message in AI textchat channel.

Request:

{
    "data": {
        "channelId": string
        "messageBody": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Get last channel message ​

Method: websocket

Endpoint: channel:getLastMessage

Description: Api returns last message of textchat channel (does not update last read timestamp).

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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 }
}

List channel messages ​

Method: websocket

Endpoint: channel:listMessages

Description: Api returns list of textchat channel messages. Api subscribes user socket to broadcast events of channel.

Field messageType could be one of:

  • 0 - my message
  • 1 - user message
  • 3 - system message
  • 4 - system json message
  • 100 - Open AI question message
  • 101 - Open AI answer message
  • 102 - Rav AI question message
  • 103 - Rav AI answer message

In case of system json message, parsed json is sent in message body:

 
{ 
    "userId": string 
    "userName": string 
    "roomId": string 
    "propId": string 
    "propName": string 
    "eventType": int 
} 

Field event could be one of:

  • 1 - user entered booth
  • 2 - user wrote to booth
  • 3 - user entered social circle
  • 4 - user wrote to social circle

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 (both before and after), single (single message)
        "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
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
    }
    "error": { "status": bool, "code": int, "message": string }
}

List channel messages with engagement ​

Method: websocket

Endpoint: channel:listMessagesWithEngagement

Description: Api does the same as listMessages but also returns user votes for messages.

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 (both before and after), single (single message)
        "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
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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 }
}

Search channel messages ​

Method: websocket

Endpoint: channel:searchMessages

Description: Api searches messages across community channels. Results are ranked by relevance when a text query is provided, or by message creation time (newest first) when a text query is empty.

Scope — exactly one (channelIds, communityIds or networkIds) must be non-empty.

Optional filters:

  • query — full-text search across message body and title
  • authorIds — restrict to messages written by any of the listed user ids
  • tags — restrict to messages that carry ALL the listed option tags
  • dateFrom — lower bound on message creation time (inclusive)
  • dateTo — upper bound on message creation time (inclusive)
  • limit — maximum number of results per page (1–100; defaults to 20)

Request:

{
    "data": {
        "channelIds": [ string ]  // search within selected channels
        "communityIds": [ string ]  // search across all channels of selected communities
        "networkIds": [ string ]  // search across all community channels in selected networks
        "query": string  // full-text search query
        "authorIds": [ string ]  // filter by one or more author user ids
        "tags": [ string ]  // filter by message options/tags (AND — all must match)
        "dateFrom": timestamp  // filter messages created at or after this timestamp
        "dateTo": timestamp  // filter messages created at or before this timestamp
        "cursor": string  // opaque cursor from previous response; omit for first page
        "limit": int  // max results to return (1-100)
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "messages": [{
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
        }]
        "total": int
        "nextCursor": string  // pass as cursor in the next request; empty means no more pages
        "userVotes": map[string]int  // user votes per message id (if set)
    }
    "error": { "status": bool, "code": int, "message": string }
}

Set channel last read message ​

Method: websocket

Endpoint: channel:setChannelLastReadMessage

Description: Api updates last read timestamp for textchat channel participant.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Set vote for channel message ​

Method: websocket

Endpoint: channel:setVoteForMessage

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 }
}

Create channel poll message ​

Method: websocket

Endpoint: channel:createPollMessage

Description: Api creates a new poll message in a textchat channel.

Request:

{
    "data": {
        "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
        "subChannelId": string  // subchannel id, if message is sent to subchannel
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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 }
}

Post poll vote ​

Method: websocket

Endpoint: channel:postPollVote

Description: Api casts a vote in the poll.

Request:

{
    "data": {
        "channelId": string
        "pollId": string
        "options": [ string ]  // list of options to vote
        "undo": bool  // true to retract the existing vote
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "pollId": string
        "userId": string
        "options": [ string ]  // list of options the user voted for
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get poll stats ​

Method: websocket

Endpoint: channel:getPollStats

Description: Api gets a map of user votes for non-anonymous polls.

Request:

{
    "data": {
        "pollId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "usersPerOption": map[string][ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

React to message ​

Method: websocket

Endpoint: channel:reactToMessage

Description: Api sends a reaction to the specified message in a textchat channel.

Request:

{
    "data": {
        "channelId": string
        "messageId": string  // id the message to send reaction to
        "emoji": string  // emoji in unicode v16 string, empty string will erase the existing one.
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "channelId": string
        "messageId": string
        "reactions": {
            "counters": [{  // counter per reaction, in descending order
                "emoji": string
                "count": int
            }]
            "userEmoji": string  // user's emoji reaction to the message
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

List users reacted to message ​

Method: websocket

Endpoint: channel:listUsersReactedToMessage

Description: Api returns a list of users to reacted to the specified message in a textchat channel.

Request:

{
    "data": {
        "channelId": string
        "messageId": string
        "emoji": string  // users reacted with the emoji
        "cursor": string  // userId, return users created after the specified userId
        "limit": int  // max number of messages to return (1-100)
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "userList": [{  // list of reacted users with ascending order by userId
            "channelId": string
            "bucketId": string
            "messageId": string
            "userId": string
            "emoji": string
            "created": timestamp
        }]
        "hasMore": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search attachments of channel ​

Method: websocket

Endpoint: channel:searchAttachmentsOfChannel

Request:

{
    "data": {
        "channelId": string
        "query": string
        "cursor": string
        "limit": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [{ resource structure }]
        "nextCursor": string
        "hasMore": bool
        "permissions": {
            "get": bool  // permission to fetch single item from belonging
            "list": bool  // permission to list items within belonging
            "create": bool  // permission to add item to belonging
            "update": bool  // permission to update item within belonging
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create sub channel ​

Method: websocket

Endpoint: channel:createSubChannel

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "parentSubChannelId": string  // parent subchannel id, if nested
        "title": string  // subchannel title
        "contentDirectoryId": string  // content directory id for the sub channel, attachments will belong there
        "options": [ string ]  // additional options for a subchannel, like 'events' or 'booth'
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "subChannel": {
            "channelId": string
            "subChannelId": string
            "parentSubChannelPath": string
            "parentSubChannelTitles": [ string ]
            "created": timestamp
            "title": string
            "contentDirectoryId": string
            "options": [ string ]
            "lastMessageBucketId": string
            "lastMessage": {
                "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
            }
            "messageCount": int
            "subChannelCount": int
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete sub channel ​

Method: websocket

Endpoint: channel:deleteSubChannel

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "subChannelId": string  // subchannel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update sub channel ​

Method: websocket

Endpoint: channel:updateSubChannel

Request:

{
    "data": {
        "channelId": string
        "subChannelId": string
        "title": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

List sub channels ​

Method: websocket

Endpoint: channel:listSubChannels

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "parentSubChannelId": string  // parent subchannel id, if nested
        "fetchNested": bool  // if false - api fetches only first level of subchannels; if true - all nested subchannels
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "subChannels": [{
            "channelId": string
            "subChannelId": string
            "parentSubChannelPath": string
            "parentSubChannelTitles": [ string ]
            "created": timestamp
            "title": string
            "contentDirectoryId": string
            "options": [ string ]
            "lastMessageBucketId": string
            "lastMessage": {
                "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
            }
            "messageCount": int
            "subChannelCount": int
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get sub channel and parents ​

Method: websocket

Endpoint: channel:getSubChannelAndParents

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "subChannelId": string  // subchannel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "subChannels": [{
            "channelId": string
            "subChannelId": string
            "parentSubChannelPath": string
            "parentSubChannelTitles": [ string ]
            "created": timestamp
            "title": string
            "contentDirectoryId": string
            "options": [ string ]
            "lastMessageBucketId": string
            "lastMessage": {
                "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
            }
            "messageCount": int
            "subChannelCount": int
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get z addresses for channel participants ​

Method: websocket

Endpoint: channel:getZAddressesForParticipants

Description: Api returns z-addresses of channel participants.

Api is now available only for direct and group channels.

Api returns map of userId -> zAddress for all channel participants. If user does not have z-address, empty string is returned for that userId. Participants with empty zAddress would not be able to decrypt messages in the channel. Application should detect this situation and inform user about it.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "zAddresses": map[string]string  // map of zAddresses per userIds for channel participants
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create channel encryption epoch ​

Method: websocket

Endpoint: channel:createEncryptionEpoch

DEPRECATED

Description: Api creates new epoch for channel message encryption. Client application need to provide encrypted viewing key for each channel participant.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelZAddress": string  // channel zAddress for epoch
        "participants": [{  // channel participants and viewing keys for epoch
            "userId": string  // participant user id
            "userZAddress": string  // participant zAddress for epoch
            "vkEpk": string  // ephemeral public key for viewing key decryption
            "vkCypher": string  // viewing key of channel epoch encrypted for participant
        }]
        "expectedEpoch": int  // optional, if provided - server will check that new epoch equals to expectedEpoch (detect simultaneous epoch creation)
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "epoch": {
            "channelId": string  // textchat channel id
            "channelZAddress": string  // channel zAddress for epoch
            "epoch": int  // channel epoch number
            "created": timestamp  // epoch creation time
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Update channel encryption epoch ​

Method: websocket

Endpoint: channel:updateEncryptionEpoch

DEPRECATED

Description: Api updates epoch for participant in channel. This is useful in case when user has changed his zAddress and wants to update viewing keys correspondingly.

Request:

{
    "data": {
        "channelId": string
        "epoch": int
        "userZAddress": string  // participant zAddress for epoch
        "vkEpk": string  // ephemeral public key for viewing key decryption
        "vkCypher": string  // viewing key of channel epoch encrypted for participant
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

List channel encryption epoches ​

Method: websocket

Endpoint: channel:listEncryptionEpoches

DEPRECATED

Description: Api returns list of all epoches for provided channel.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "epoches": [{
            "channelId": string  // textchat channel id
            "channelZAddress": string  // channel zAddress for epoch
            "epoch": int  // channel epoch number
            "created": timestamp  // epoch creation time
            "userId": string  // participant user id
            "userZAddress": string  // participant zAddress for epoch
            "vkEpk": string  // ephemeral public key for viewing key decryption
            "vkCypher": string  // viewing key of channel epoch encrypted for participant
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

List channel encryption epoches by tuples ​

Method: websocket

Endpoint: channel:listEncryptionEpochesByTuples

DEPRECATED

Description: Api returns list of epoches for provided channels-epoch tuples.

Request:

{
    "data": {
        "epochTuples": [ ( targetId string, epoch int ) ]  // list of [targetId, epoch] tuples
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "epoches": [{
            "channelId": string  // textchat channel id
            "channelZAddress": string  // channel zAddress for epoch
            "epoch": int  // channel epoch number
            "created": timestamp  // epoch creation time
            "userId": string  // participant user id
            "userZAddress": string  // participant zAddress for epoch
            "vkEpk": string  // ephemeral public key for viewing key decryption
            "vkCypher": string  // viewing key of channel epoch encrypted for participant
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

List channel encryption epoches by z address ​

Method: websocket

Endpoint: channel:listEncryptionEpochesByZAddress

DEPRECATED

Description: Api returns list of epoches for provided user zAddress.

Request:

{
    "data": {
        "zAddress": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "epoches": [{
            "channelId": string  // textchat channel id
            "channelZAddress": string  // channel zAddress for epoch
            "epoch": int  // channel epoch number
            "created": timestamp  // epoch creation time
            "userId": string  // participant user id
            "userZAddress": string  // participant zAddress for epoch
            "vkEpk": string  // ephemeral public key for viewing key decryption
            "vkCypher": string  // viewing key of channel epoch encrypted for participant
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get last channel encryption epoch ​

Method: websocket

Endpoint: channel:getLastEncryptionEpoch

DEPRECATED

Description: Api returns last epoch for participant in channel.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "epoch": {
            "channelId": string  // textchat channel id
            "channelZAddress": string  // channel zAddress for epoch
            "epoch": int  // channel epoch number
            "created": timestamp  // epoch creation time
            "userId": string  // participant user id
            "userZAddress": string  // participant zAddress for epoch
            "vkEpk": string  // ephemeral public key for viewing key decryption
            "vkCypher": string  // viewing key of channel epoch encrypted for participant
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Request new encryption epoch for channel ​

Method: websocket

Endpoint: channel:requestNewEncryptionEpoch

Description: Api marks channel as needing new encryption epoch.

Request:

{
    "data": {
        "channelId": string  // textchat channel id
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

On message created event ​

Event: channel:onMessageCreated

Description: Event is triggered when a new message is created in a channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "message": {  // message model
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
        }
        "isLastMessage": bool  // true, if the last message in the channel
        "spawnParentId": string  // parent channel id for spawned channel
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message deleted event ​

Event: channel:onMessageDeleted

Description: Event is triggered when message is deleted from a channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "messageId": string  // message id
        "isLastMessage": bool  // true, if the last message in the channel
        "subChannelPath": string  // ids of parent subchannels (if present)
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message edited event ​

Event: channel:onMessageEdited

Description: Event is triggered when message body is updated in a channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "message": {  // message model
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
        }
        "isLastMessage": bool  // true, if the last message in the channel
        "spawnParentId": string  // parent channel id for spawned channel
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message blocked status updated event ​

Event: channel:onMessageBlockedStatusUpdated

Description: Event is triggered when message blocked status updated in a channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "message": {  // message model
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
        }
        "isLastMessage": bool  // true, if the last message in the channel
        "spawnParentId": string  // parent channel id for spawned channel
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message deleted status updated event ​

Event: channel:onMessageDeletedStatusUpdated

Description: Event is triggered when message deleted status updated in a channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "message": {  // message model
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": 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
                "updated": timestamp
                "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
                    "updated": timestamp
                    "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
                    "updated": timestamp
                    "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 ]
            "customParams": map[string]{ custom structure }
            "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
        }
        "isLastMessage": bool  // true, if the last message in the channel
        "spawnParentId": string  // parent channel id for spawned channel
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message read event ​

Event: channel:onMessageRead

Description: Event is triggered when a user requests a message that has been previously not read by him.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "userId": string  // participant user id
        "lastReadTs": timestamp  // participant last read message timestamp
    }
    "error": { "status": bool, "code": int, "message": string }
}

On unread count updated event ​

Event: channel:onUnreadCountUpdated

Description: Event is triggered when counter of unread channels for user is updated.

Data:

{
    "data": {
        "unreadChannelCount": int  // amount of user channels with unread messages
        "highAlertCount": int  // amount of user channels on high alert with unread messages'
    }
    "error": { "status": bool, "code": int, "message": string }
}

On message reaction event ​

Event: channel:onMessageReaction

Description: Event is triggered when a new reaction is added to a message

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelSource": string  // channel source (belonging) string
        "messageId": string  // message id
        "userId": string  // participant's' user id who reacted to the message
        "reactions": {  // updated reactions
            "counters": [{  // counter per reaction, in descending order
                "emoji": string
                "count": int
            }]
            "userEmoji": string  // user's emoji reaction to the message
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On poll vote event ​

Event: channel:onPollVote

Description: Event is triggered when someone votes in a channel poll.

Data:

{
    "data": {
        "channelId": string
        "channelSource": string
        "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
        }
        "userVote": {  // optional, specified only if the poll is not anonymous
            "userId": string
            "option": [ string ]
            "undo": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On sub channel created event ​

Event: channel:onSubChannelCreated

Description: Event is triggered when sub channel is created within channel.

Data:

{
    "data": {
        "subChannel": {
            "channelId": string
            "subChannelId": string
            "parentSubChannelPath": string
            "parentSubChannelTitles": [ string ]
            "created": timestamp
            "title": string
            "contentDirectoryId": string
            "options": [ string ]
            "lastMessageBucketId": string
            "lastMessage": {
                "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
            }
            "messageCount": int
            "subChannelCount": int
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On sub channel deleted event ​

Event: channel:onSubChannelDeleted

Description: Event is triggered when sub channel is deleted within channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "subChannelId": string  // subchannel id
    }
    "error": { "status": bool, "code": int, "message": string }
}

On sub channel updated event ​

Event: channel:onSubChannelUpdated

Description: Event is triggered when sub channel is updated within channel.

Data:

{
    "data": {
        "subChannel": {
            "channelId": string
            "subChannelId": string
            "parentSubChannelPath": string
            "parentSubChannelTitles": [ string ]
            "created": timestamp
            "title": string
            "contentDirectoryId": string
            "options": [ string ]
            "lastMessageBucketId": string
            "lastMessage": {
                "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
            }
            "messageCount": int
            "subChannelCount": int
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On channel encryption epoch created event ​

Event: channel:onEpochCreated

DEPRECATED

Description: Event is triggered when new epoch is created within channel.

Data:

{
    "data": {
        "channelId": string  // textchat channel id
        "channelZAddress": string  // channel zAddress for epoch
        "epoch": int  // channel epoch number
        "created": timestamp  // epoch creation time
        "userId": string  // participant user id
        "userZAddress": string  // participant zAddress for epoch
        "vkEpk": string  // ephemeral public key for viewing key decryption
        "vkCypher": string  // viewing key of channel epoch encrypted for participant
    }
    "error": { "status": bool, "code": int, "message": string }
}

On last epoch updated event ​

Event: channel:onLastEpochUpdated

Description: Event is triggered when epoch info is changed in channel model (requested or created new epoch).

Data:

{
    "data": {
        "channelId": string
        "lastEpoch": int  // last encryption epoch number for a channel
        "needNewEpoch": bool  // flag to point that channel encryption epoch should be changed on next message
    }
    "error": { "status": bool, "code": int, "message": string }
}

Models ​


Resource ​

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "title": string
    "description": string
    "location": string
    "date": string
    "category": string
    "linkId": string  // id of resource link is pointing to
    "linkType": string  // global/local
    "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
    "userId": string  // user id of resource author
    "belonging": string  // determines resource location in the system in a way 'belongingType:belongingPath(networkId)'
    "status": string  // pending/processing/ready/failed
    "metadata": {
        "fileName": string
        "fileSize": int
        "fileDate": timestamp
        "behaviourType": string
        "contentType": string
        "convertedFrom": string
        "link": string
        "origin": { resource origin structure }
        "geolocation": { geolocation structure }
        "dimensions": { dimensions structure }
    }
    "thumbnail": string
    "fromTemplate": bool
    "totalReactions": int  // amount of users who reacted to the resource
    "data": {
        "audio": { resource data audio structure }
        "video": { resource data video structure }
        "amazon": { resource data amazon structure }
        "imdb": { resource data imdb structure }
        "youtube": { resource data youtube structure }
        "vimeo": { resource data vimeo structure }
        "pinterest": { resource data pinterest structure }
        "pixabay": { resource data pixabay structure }
        "facebook": { resource data facebook structure }
        "remoteUrl": { resource data remote url structure }
        "liveStream": { live stream data structure }
        "aiGeneration": { ai generation data structure }
        "thumbnailUrl": string
        "downloadUrl": string
        "directory": { resource data directory structure }
        "googleDrive": { google drive structure }
        "channel": { channel data structure }
        "enrichment": { enrichment data structure }
    }
    "customParams": map[string]{ custom structure }  // client defined parameters
    "actions": [{ programmatic action with children structure }]  // custom programmatic actions from users
}

Resource Origin ​

{
    "type": string
    "device": string
    "deviceName": string
    "path": string
}

Geolocation ​

{
    "latitude": float
    "longitude": float
}

Dimensions ​

{
    "width": int
    "height": int
    "orientation": int
}

Resource Data Audio ​

{
    "title": string
    "artist": string
    "album": string
    "genre": string
    "duration": int
    "durationFloat": float
}

Resource Data Video ​

{
    "duration": int
    "durationFloat": float
    "hasAlphaChannel": bool  // true, if video generated from gif with transparent pixels
    "alphaChannel": string  // alpha channel video resource (if generated from gif)
}

Resource Data Amazon ​

{
    "asin": string
    "summary": string
    "author": [ string ]
    "manufacturer": string
    "title": string
    "publicationDate": string
    "url": string
}

Resource Data Imdb ​

{
    "Actors": string
    "Genre": string
    "Ratings": [{
        "Source": string
        "Value": string
    }]
    "Released": string
    "Runtime": string
    "Website": string
    "Year": string
    "Trailers": [ string ]
    "imdbID": string
}

Resource Data Youtube ​

{
    "videoId": string
    "formatId": string
}

Resource Data Vimeo ​

{
    "videoUrl": string
    "formatId": string
}

Resource Data Pinterest ​

{
    "pin": string
    "url": string
}

Resource Data Pixabay ​

{
    "id": string
    "pageUrl": string
}

Resource Data Facebook ​

{
    "id": string
}

Resource Data Remote Url ​

{
    "url": string
    "urlType": string
    "favicon": string
    "title": string
}

Live Stream Data ​

{
    "streamId": string
    "assetId": string
    "playbackUrl": string
    "masterUrl": string
    "createdAt": int
}

AI Generation Data ​

{
    "generationModel": string  // the model used for image generation [gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-image-1-mini]; defaults to gpt-image-2
    "prompt": string  // a text description of the desired image
    "revisedPrompt": string  // the prompt that was used to generate the image, if there was any revision to the prompt
    "url": string  // the URL of the generated image
}

Resource Data Directory ​

{
    "innerContentType": string
    "innerContentCount": int
}

Google Drive ​

{
    "fileId": string
    "name": string
    "mimeType": string
}

Channel Data ​

{
    "communityId": string
    "channelId": string
    "subChannelId": string
    "messageId": string
}

Enrichment Data ​

{
    "categories": [ string ]
    "enrichedAt": timestamp
    "enrichmentStatus": string
    "language": string
    "qualityScore": int
    "tags": [ string ]
}

Programmatic Action with children ​

{
    "localId": string  // local action id, operated by client side only
    "eventName": string
    "actionName": string
    "actionData": {
        "usedPropId": string
        "usedRoomId": string
        "usedNetworkId": string
        "usedStorylineId": string
        "usedQuestionId": int
        "usedQuestionnaireId": int
        "usedSegmentId": string
        "usedPlacementAreaId": string
        "usedRoomPoint": string
        "animationData": map[string]{ custom structure }
    }
    "childActions": [{ programmatic action structure }]
}

Programmatic Action ​

{
    "localId": string  // local action id, operated by client side only
    "eventName": string
    "actionName": string
    "actionData": {
        "usedPropId": string
        "usedRoomId": string
        "usedNetworkId": string
        "usedStorylineId": string
        "usedQuestionId": int
        "usedQuestionnaireId": int
        "usedSegmentId": string
        "usedPlacementAreaId": string
        "usedRoomPoint": string
        "animationData": map[string]{ custom structure }
    }
}