Skip to content
On this page

Social events API

API allows to hold events, where users can create sessions, invite participants, join public session of other users and meet in videochat conference.

EndpointMethodDescription
/api/v0/resource/sessionInvitation/{sessionId}webRequestGet ICS file for social invitation
social:createEventwebsocketCreate social event
social:updateEventwebsocketUpdate social event
social:publishEventwebsocketPublish social event
social:deleteEventwebsocketDelete social event
social:getEventwebsocketGet social event
social:getEventswebsocketGet social events
social:createSessionwebsocketCreate social session
social:updateSessionwebsocketUpdate social session
social:deleteSessionwebsocketDelete social session
social:getSessionwebsocketGet social session
social:getSessionswebsocketGet social sessions
social:getPropSessionswebsocketGet prop social sessions
social:inviteUsersToSessionwebsocketInvite users to social session
social:deleteUserSessionInvitationswebsocketDelete user social session invitations
social:joinSessionwebsocketJoin social session
social:declineSessionJoinwebsocketDecline social session join
social:sessionUpdatedwebsocketEventOn social session updated event
social:sessionDeletedwebsocketEventOn social session deleted event

Get ICS file for social invitation

HTTP Method: GET

Path: /api/v0/resource/sessionInvitation/

Description: Endpoint returns ICS file for social session invitation.

If session doesn't exist or user doesn't have permissions for social invitation, endpoint returns status code 404 Not Found.

Request:

{ empty }

Response:

ICS file

Create social event

Method: websocket

Endpoint: social:createEvent

Description: Available sources for social events:

  • Network event - network:{networkId}
  • Community event - community:{networkId}:{communityId}

Request:

{
    "data": {
        "source": string
        "event": {
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
        }
        "formSchema": map[string]{ custom structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "event": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "sourceString": string
            "sourceType": string
            "sourcePk": string
            "networkId": string
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
            "status": int  // 0 - Draft, 1 - Published
            "formSchema": map[string]{ custom structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Update social event

Method: websocket

Endpoint: social:updateEvent

Request:

{
    "data": {
        "eventId": string
        "event": {
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
        }
        "formSchema": map[string]{ custom structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "event": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "sourceString": string
            "sourceType": string
            "sourcePk": string
            "networkId": string
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
            "status": int  // 0 - Draft, 1 - Published
            "formSchema": map[string]{ custom structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Publish social event

Method: websocket

Endpoint: social:publishEvent

Request:

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

Response:

{
    "data": {
        "event": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "sourceString": string
            "sourceType": string
            "sourcePk": string
            "networkId": string
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
            "status": int  // 0 - Draft, 1 - Published
            "formSchema": map[string]{ custom structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete social event

Method: websocket

Endpoint: social:deleteEvent

Request:

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

Response:

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

Get social event

Method: websocket

Endpoint: social:getEvent

Request:

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

Response:

{
    "data": {
        "event": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "sourceString": string
            "sourceType": string
            "sourcePk": string
            "networkId": string
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
            "status": int  // 0 - Draft, 1 - Published
            "formSchema": map[string]{ custom structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get social events

Method: websocket

Endpoint: social:getEvents

Request:

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

Response:

{
    "data": {
        "events": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "sourceString": string
            "sourceType": string
            "sourcePk": string
            "networkId": string
            "title": string
            "description": string
            "startDate": timestamp
            "endDate": timestamp
            "previewResourceId": string  // resourceId of the preview image for the event
            "roomId": string  // default roomId for event sessions
            "participantLimit": int  // limit on number of participants, 0 means no limit
            "price": float  // price of the event, 0 means free event
            "customData": map[string]{ custom structure }  // custom data for the event, like event venue, url, etc.
            "status": int  // 0 - Draft, 1 - Published
            "formSchema": map[string]{ custom structure }
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create social session

Method: websocket

Endpoint: social:createSession

Request:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
        }
        "usersToInvite": [{
            "userId": string
            "facebook": string(fbAppId:fbUserId)
            "emails": [ string ]
            "phones": [ string ]
            "role": int  // Attendee - 0, Presenter - 1, Panelist - 2
        }]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Update social session

Method: websocket

Endpoint: social:updateSession

Request:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete social session

Method: websocket

Endpoint: social:deleteSession

Request:

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

Response:

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

Get social session

Method: websocket

Endpoint: social:getSession

Request:

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

Response:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get social sessions

Method: websocket

Endpoint: social:getSessions

Request:

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

Response:

{
    "data": {
        "sessions": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get prop social sessions

Method: websocket

Endpoint: social:getPropSessions

Description: API returns 2 nearest events (ongoing or future).

Request:

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

Response:

{
    "data": {
        "sessions": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Invite users to social session

Method: websocket

Endpoint: social:inviteUsersToSession

Request:

{
    "data": {
        "sessionId": string
        "usersToInvite": [{
            "userId": string
            "facebook": string(fbAppId:fbUserId)
            "emails": [ string ]
            "phones": [ string ]
            "role": int  // Attendee - 0, Presenter - 1, Panelist - 2
        }]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Delete user social session invitations

Method: websocket

Endpoint: social:deleteUserSessionInvitations

Request:

{
    "data": {
        "sessionId": string
        "usersToInvite": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Join social session

Method: websocket

Endpoint: social:joinSession

Request:

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

Response:

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

Decline social session join

Method: websocket

Endpoint: social:declineSessionJoin

Request:

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

Response:

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

On social session updated event

Event: social:sessionUpdated

Data:

{
    "data": {
        "session": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "eventId": string
            "ownerId": string
            "roomId": string
            "propId": string
            "sessionType": int  // Public - 0, Private - 1, OpenSlot - 2
            "title": string
            "description": string
            "startDate": timestamp
            "duration": int  // duration in seconds
            "isRecurring": bool
            "color": { rgba structure }
            "isValid": bool  // not valid if room or prop were deleted
            "owner": { user simple structure }
            "invitedUsers": [{
                "user": { user simple structure }
                "role": int
            }]
            "joinedUsers": [{ user simple structure }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On social session deleted event

Event: social:sessionDeleted

Data:

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

Models


RGBA

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

User Simple

{
    "id": string
    "firstName": string
    "lastName": string
    "privacyMode": int  // 0 - Default, 1 - Incognito
    "avatar": string
    "avatar3D": {  // field is not returned if empty
        "assetId": string
        "assetSkins": map[string]string  // map of selected skins per variants
        "avatarUrl": string  // url to gbl file (Ready Player Me)
        "avatarUserId": string  // user id for session recovery (Ready Player Me)
    }
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}