Skip to content
On this page

Room: Preset API

EndpointMethodDescription
room:createPresetAreawebsocketCreate preset area
room:deletePresetAreawebsocketDelete preset area
room:listPresetAreaswebsocketList preset areas
room:getPresetAreaContentwebsocketGet preset area content
room:addPresetAreaPropsToRoomwebsocketAdd preset area props to room
room:createPlacementAreawebsocketCreate placement area
room:updatePlacementAreawebsocketUpdate placement area
room:updatePlacementAreaCompanyNamewebsocketUpdate placement area company name
room:setPlacementAreaCustomizationwebsocketSet placement area customization
room:purchasePlacementAreawebsocketPurchase placement area
room:expirePlacementAreaSubscriptionwebsocketExpire placement area subscription
room:deletePlacementAreawebsocketDelete placement area
room:restorePlacementAreawebsocketRestore placement area
room:placementAreaCreatedwebsocketEventEvent: placement area created
room:placementAreaUpdatedwebsocketEventEvent: placement area updated
room:placementAreaDeletedwebsocketEventEvent: placement area deleted
room:presetAreaCreatedwebsocketEventEvent: preset area created
room:presetAreaDeletedwebsocketEventEvent: preset area deleted
room:placementAreaswebsocketEventPlacement areas event

Create preset area

Method: websocket

Endpoint: room:createPresetArea

Request:

{
    "data": {
        "roomId": string
        "thumbnailId": string
        "name": string
        "geometry": { geometry structure }
        "props": [{
            "propId": string
            "position": { xyz structure }
            "rotation": { xyz structure }
        }]
        "linkPropContent": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Delete preset area

Method: websocket

Endpoint: room:deletePresetArea

Request:

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

Response:

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

List preset areas

Method: websocket

Endpoint: room:listPresetAreas

Description: Api returns a list of all user preset areas.

Request:

{
    "data": {
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "presetAreas": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string  // preset owner
            "roomId": string  // room where preset is located
            "thumbnailId": string  // resource id of thumbnail
            "name": string  // name of preset
            "geometry": { geometry structure }  // preset geometry
            "linkPropContent": bool  // if true - preset props link content from source props
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get preset area content

Method: websocket

Endpoint: room:getPresetAreaContent

Description: Api returns preset area content.

Request:

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

Response:

{
    "data": {
        "props": [{ room prop structure }]
        "assets": map[string]{ asset bundle prop structure }
        "propSkins": map[string]{ asset bundle skin structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Add preset area props to room

Method: websocket

Endpoint: room:addPresetAreaPropsToRoom

Description: Api adds props from preset area to room. If placementAreaId provided - server will check if user can add props to a placement area instead of the room.

Request:

{
    "data": {
        "roomId": string
        "placementAreaId": string
        "presetAreaId": string
        "props": map[string]{
            "panelId": string
            "position": { xyz structure }
            "rotation": { xyz structure }
        }
        "linkPropContent": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Create placement area

Method: websocket

Endpoint: room:createPlacementArea

Request:

{
    "data": {
        "roomId": string
        "panelId": string
        "name": string
        "price": float
        "geometry": { geometry structure }
        "customization": {
            "outlineColor": { rgba structure }
            "floorTextColor": { rgba structure }
            "flyingTextColor": { rgba structure }
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Update placement area

Method: websocket

Endpoint: room:updatePlacementArea

Request:

{
    "data": {
        "roomId": string
        "panelId": string
        "placementAreaId": string
        "name": string
        "price": float
        "geometry": { geometry structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Update placement area company name

Method: websocket

Endpoint: room:updatePlacementAreaCompanyName

Request:

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

Response:

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

Set placement area customization

Method: websocket

Endpoint: room:setPlacementAreaCustomization

Request:

{
    "data": {
        "roomId": string
        "placementAreaId": string
        "outlineColor": { rgba structure }
        "floorTextColor": { rgba structure }
        "flyingTextColor": { rgba structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Purchase placement area

Method: websocket

Endpoint: room:purchasePlacementArea

Request:

{
    "data": {
        "roomId": string
        "placementAreaId": string
        "companyName": string
        "purchaseOptions": {
            "subscriptionPlan": string  // free/one_time_payment/subscription_week/subscription_month/subscription_6_months/subscription_year
            "walletAddress": string  // wallet address (in case of crypto currency payment)
            "currency": string  // rents (default) / roomi (Roomful crypto currency) / Valu (ValuVerse crypto currency)
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Expire placement area subscription

Method: websocket

Endpoint: room:expirePlacementAreaSubscription

Request:

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

Response:

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

Delete placement area

Method: websocket

Endpoint: room:deletePlacementArea

Request:

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

Response:

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

Restore placement area

Method: websocket

Endpoint: room:restorePlacementArea

Request:

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

Response:

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

Event: placement area created

Event: room:placementAreaCreated

Data:

{
    "data": {
        "placementArea": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "roomId": string  // room where preset is located
            "panelId": string  // room panel where preset is located
            "name": string  // name of placement area to be displayed in UI
            "price": float  // price for renting placement area
            "geometry": { geometry structure }  // placement area geometry relative to room
            "owner": string  // client who purchased placement area
            "subscriptionStatus": string  // free/active/expired
            "companyName": string  // name of company who purchased placement area
            "customization": {  // placement area visual customization
                "outlineColor": { rgba structure }
                "floorTextColor": { rgba structure }
                "flyingTextColor": { rgba structure }
            }
            "propIds": [ string ]  // list of props that are placed in this placement area
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Event: placement area updated

Event: room:placementAreaUpdated

Data:

{
    "data": {
        "placementArea": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "roomId": string  // room where preset is located
            "panelId": string  // room panel where preset is located
            "name": string  // name of placement area to be displayed in UI
            "price": float  // price for renting placement area
            "geometry": { geometry structure }  // placement area geometry relative to room
            "owner": string  // client who purchased placement area
            "subscriptionStatus": string  // free/active/expired
            "companyName": string  // name of company who purchased placement area
            "customization": {  // placement area visual customization
                "outlineColor": { rgba structure }
                "floorTextColor": { rgba structure }
                "flyingTextColor": { rgba structure }
            }
            "propIds": [ string ]  // list of props that are placed in this placement area
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Event: placement area deleted

Event: room:placementAreaDeleted

Data:

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

Event: preset area created

Event: room:presetAreaCreated

Data:

{
    "data": {
        "presetArea": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string  // preset owner
            "roomId": string  // room where preset is located
            "thumbnailId": string  // resource id of thumbnail
            "name": string  // name of preset
            "geometry": { geometry structure }  // preset geometry
            "linkPropContent": bool  // if true - preset props link content from source props
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Event: preset area deleted

Event: room:presetAreaDeleted

Data:

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

Placement areas event

Event: room:placementAreas

Description: An event is triggered when a client requested for a room that has placement areas within.

Data:

{
    "data": {
        "placementAreas": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "roomId": string  // room where preset is located
            "panelId": string  // room panel where preset is located
            "name": string  // name of placement area to be displayed in UI
            "price": float  // price for renting placement area
            "geometry": { geometry structure }  // placement area geometry relative to room
            "owner": string  // client who purchased placement area
            "subscriptionStatus": string  // free/active/expired
            "companyName": string  // name of company who purchased placement area
            "customization": {  // placement area visual customization
                "outlineColor": { rgba structure }
                "floorTextColor": { rgba structure }
                "flyingTextColor": { rgba structure }
            }
            "propIds": [ string ]  // list of props that are placed in this placement area
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Models


Geometry

{
    "scale": float
    "size": { xyz structure }
    "position": { xyz structure }
    "rotation": { xyz structure }
}

XYZ

{
    "x": float
    "y": float
    "z": float
}

Room Prop

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "mobileGeometry": { geometry structure }
    "title": string
    "description": string
    "tags": [ string ]
    "propTypes": [ string ]  // booth/fileCabinet/socialCircleStatic/socialCircleDynamic/entireRoomChat
    "parentId": string  // prop id of parent where current prop is standing
    "actionType": string
    "webLink": string
    "webTitle": string
    "isInteractive": bool  // show prop when clicking next/previous in room prop list
    "showType": int  // 0 - None, 1 - GoldPanel, 2 - BoothPanel
    "contentPickerType": int  // 0 - Default, 1 - AudioContainer, 2 - VideoContainer
    "contentSorting": {
        "type": string  // default/name/date/type/size
        "direction": string  // asc/desc
    }
    "contentAppend": string  // default direction for content appending (start/end)
    "isAllowTextchat": bool  // if true - allow prop textchat
    "allowUserParams": bool  // if true - allow custom params per user
    "customParams": map[string]{ custom structure }  // client defined params
    "actions": [{ programmatic action with children structure }]  // custom programmatic actions from users
    "dataBound": {  // bound prop data to some action
        "isEnabled": bool
        "dataBoundAction": string
    }
    "assetId": string
    "assetTitle": string
    "assetSkins": map[string]string  // map of selected skins per variants
    "roomId": string
    "roomTitle": string
    "styleId": string
    "panelId": string
    "placementAreaId": string  // in case if prop is a part of placement area
    "contentSource": {  // if present, current prop will fetch content from source prop
        "roomId": string
        "propId": string
    }
    "contentCount": int  // amount of resources in prop
    "content": [{ resource structure }]  // prop resources
}

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

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
    "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 }
        "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 }
        "channel": { channel data structure }
        "googleDrive": { google drive 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 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
}

AI Generation Data

{
    "generationModel": string  // the model used for image generation [dall-e-3]
    "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
}

Channel Data

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

Google Drive

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

Asset Bundle Prop

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "status": string  // workInProgress/published
    "ownership": string  // empty - public asset; network:{networkId} - belongs to network
    "hasVariants": bool  // asset has skin variants
    "title": string
    "tags": [ string ]
    "price": float  // price per month (when creating room with the asset)
    "score": int  // featuring score for ordering assets
    "displaySkins": bool  // display all skins in sorting table
    "params": map[string]{ custom structure }  // client defined custom data
    "editorParams": map[string]{ custom structure }  // editor defined custom data / not used in runtime
    "urls": map[string]string  // asset data urls per platform
    "thumbnail": { resource structure }
    "placing": string
    "invokeType": string
    "minScale": float
    "maxScale": float
    "canStack": bool
    "pedestalInZoomView": bool
    "alternativeZoom": bool
    "size": { xyz structure }
    "contentType": [ string ]  // supported content types for asset template
    "assetBundleMeta": {
        "logoCount": int  // show amount of logos in content management system
        "thumbnailCount": int  // show amount of thumbnails in content management system
    }
}

Asset Bundle Skin

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "assetId": string
    "variantId": string
    "name": string
    "isDefault": bool  // is default among other variant skins
    "overrideColor": { rgba structure }  // override default color
    "colorOnly": bool  // doesn't have textures, only color'
    "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
    "sortOrder": int
    "isHidden": bool  // hides skin from client
    "thumbnail": { resource structure }
    "urls": map[string]string  // asset skin data urls per platform
    "defaultColor": { rgba structure }  // applied by parent variant model
}

RGBA

{
    "r": float
    "g": float
    "b": float
    "a": float
}