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.
| Endpoint | Method | Description |
|---|---|---|
| /api/v0/resource/sessionInvitation/{sessionId} | webRequest | Get ICS file for social invitation |
| social:createEvent | websocket | Create social event |
| social:updateEvent | websocket | Update social event |
| social:publishEvent | websocket | Publish social event |
| social:deleteEvent | websocket | Delete social event |
| social:getEvent | websocket | Get social event |
| social:getEvents | websocket | Get social events |
| social:createSession | websocket | Create social session |
| social:updateSession | websocket | Update social session |
| social:deleteSession | websocket | Delete social session |
| social:getSession | websocket | Get social session |
| social:getSessions | websocket | Get social sessions |
| social:getPropSessions | websocket | Get prop social sessions |
| social:inviteUsersToSession | websocket | Invite users to social session |
| social:deleteUserSessionInvitations | websocket | Delete user social session invitations |
| social:joinSession | websocket | Join social session |
| social:declineSessionJoin | websocket | Decline social session join |
| social:sessionUpdated | websocketEvent | On social session updated event |
| social:sessionDeleted | websocketEvent | On 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
}