Web Socket
Web Socket server URL
Production URL :
wss://api.lnchbx.com/
Develop URL :
wss://dev-api.lnchbx.com/
Connect Noteboard websocket
tId
=Tab Id&wsId
=Board Id&userId
=User ID&token
=User token&name
=Name
Query
name type data type description tId required string Browser Tab ID (random) userId required string User ID wsId required string Board ID token required string User Token name required string User name
Ready
The following command is sent when user is connected
cmd:
READY
cmd:
READYGet Notes
cmd:
GET_MULTI_NOTES
cmd:
GET_MULTI_NOTESResponses
cmd:
COMBINE_NOTES, notes:
[Note],
count:
Notes count, total_count:
Total notes count
cmd:
COMBINE_NOTES, notes:
[Note],
count:
Notes count, total_count:
Total notes countAdd new note
cmd:
ADD_NOTE,
note:
Note object,
tags:
[Tag name],
label:
Color label,
cmd:
ADD_NOTE,
note:
Note object,
tags:
[Tag name],
label:
Color label,Body
name type data type description note required string Note Object tags optional string Array of Tags label optional string Color label
Example
{
cmd: 'ADD_NOTE',
note: {
title: 'AI Feature',
content: '<h1>About AI</h1>',
contentRaw: 'block: {....}',
drawing: '{url: "https://image1.jpg"}',
}
label: 'color6',
tags: ['lunchbox', 'aws'],
}
Update note
cmd:
UPDATE_NOTE,
id:
Note Id,
title:
Note Title,
content:
Html data,
contentRaw:
Raw data,
drawing:
Image object,
label:
color label,
tags:
[Tags],
cmd:
UPDATE_NOTE,
id:
Note Id,
title:
Note Title,
content:
Html data,
contentRaw:
Raw data,
drawing:
Image object,
label:
color label,
tags:
[Tags],Body
name type data type description id required string Note ID content optional string Html content string contentRaw optional string Prosemirror JSON string drawing optional string Image object label optional string Color label tags optional string Array of tags
Example
{
cmd: 'UPDATE_NOTE',
id: 'Note Id-1',
content: '<h1>About AI</h1>',
contentRaw: 'block: {....}',
drawing: '{url: "https://image1.jpg"}',
label: 'color6',
tags: ['lunchbox', 'aws'],
}
Move Note
cmd:
RESIZE_NOTE,
id:
Note Id,
x:
Target coordinate x,
y:
Target coordinate y
cmd:
RESIZE_NOTE,
id:
Note Id,
x:
Target coordinate x,
y:
Target coordinate yForward note
cmd:
FORWARD_NOTE,
notes:
[Note object],
target:
Board ID
cmd:
FORWARD_NOTE,
notes:
[Note object],
target:
Board IDDelete note
cmd:
REMOVE_NOTE, ids:
[Note Id]
cmd:
REMOVE_NOTE, ids:
[Note Id]Add Comment
cmd:
ADD_COMMENT,
id:
Note Id,
text:
comment
cmd:
ADD_COMMENT,
id:
Note Id,
text:
commentUpdate note color
cmd:
REMOVE_NOTE,
ids:
[Note Id],
label:
Color label
cmd:
REMOVE_NOTE,
ids:
[Note Id],
label:
Color labelUpdate note tag
cmd:
UPDATE_TAG,
ids:
[Note Id],
tags:
[Tags]
cmd:
UPDATE_TAG,
ids:
[Note Id],
tags:
[Tags]Add new tag
cmd:
ADD_TAG,
tag:
Tag
cmd:
ADD_TAG,
tag:
TagAdd new reaction
cmd:
ADD_REACTION,
id:
Note ID
index:
Reaction Index
cmd:
ADD_REACTION,
id:
Note ID
index:
Reaction IndexRemove reaction
cmd:
REMOVE_REACTION,
id:
Note ID
cmd:
REMOVE_REACTION,
id:
Note IDAdd comment
cmd:
ADD_COMMENT,
id:
Note ID
text:
Comment text
cmd:
ADD_COMMENT,
id:
Note ID
text:
Comment textAdd reply comment
cmd:
ADD_COMMENT,
id:
Note ID
text:
Comment text
parent:
Reply Note ID
cmd:
ADD_COMMENT,
id:
Note ID
text:
Comment text
parent:
Reply Note IDRemove comment
cmd:
REMOVE_COMMENT,
id:
Note ID
commentId:
Comment ID
cmd:
REMOVE_COMMENT,
id:
Note ID
commentId:
Comment IDAdd comment reaction
cmd:
ADD_REACTION,
id:
Note ID
commentId:
Comment ID
index:
Reaction Index
cmd:
ADD_REACTION,
id:
Note ID
commentId:
Comment ID
index:
Reaction Index