Skip to content

Whiteboard API

Whiteboard API allows to create whiteboard functionality and associate it with a chat dialog.

Chat dialog’s users can collaborate and draw simultaneously on a whiteboard.

Separated whiteboard server endpoint is used: https://whiteboard.connectycube.com

ParameterDescription
_idWhiteboard identifier
nameWhiteboard name
chat_dialog_idA chat dialog identifier to which a whiteboard is conected to.
user_idWhiteboard creator user id
created_atWhiteboard created date.
updated_atWhiteboard updated date.
POST https://api.connectycube.com/whiteboards
ParameterRequiredDescriptionValue example
nameYesWhiteboard name”My whiteboard”
chat_dialog_idYesA chat dialog identifier to which a whiteboard is conected to. Creating whiteboard only available for Group/Private/Meeting chat dialogs. Max 3 whiteboards per chat”602f9ea20740a24ec238d9da”

Once whiteboard is created - a user can display it in app in WebView using the following url:

https://whiteboard.connectycube.com?whiteboardid={_id}&username={any_desired_username}&title={name}
Terminal window
curl -X POST \
-H "Content-Type: application/json" \
-H "CB-Token: <TOKEN>" \
-d '{"name": "My whiteboard", "chat_dialog_id": "602f9ea20740a24ec238d9da"}' \
https://api.connectycube.com/whiteboards
{
"_id": "602faca5bb3c7a638f8c0805",
"name": "My whiteboard",
"chat_dialog_id": "602f9ea20740a24ec238d9da",
"user_id": 8117,
"created_at": "2021-02-19T12:18:45.867Z",
"updated_at": "2021-02-19T12:18:45.867Z"
}
GET https://api.connectycube.com/whiteboards
ParameterRequiredDescription
chat_dialog_idYesRetrieve whiteboards related to particular chat dialog.
Terminal window
curl -X GET \
-H "CB-Token: <TOKEN>" \
https://api.connectycube.com/whiteboards?chat_dialog_id=602f9ea20740a24ec238d9da
[
{
"_id": "602faca5bb3c7a638f8c0805",
"name": "My whiteboard",
"chat_dialog_id": "602f9ea20740a24ec238d9da",
"user_id": 8117,
"created_at": "2021-02-19T12:18:45.867Z",
"updated_at": "2021-02-19T12:18:45.867Z"
}
]

A request to update whiteboard’s parameters. Only creator can update a whiteboard.

PUT https://api.connectycube.com/whiteboards/{whiteboard_id}
ParameterRequiredDescriptionData typeValue example
nameYesWhiteboard namestring”New whiteboard name”
Terminal window
curl -X PUT \
-H "Content-Type: application/json" \
-H "CB-Token: <TOKEN>" \
-d '{"name": "New whiteboard name"}' \
https://api.connectycube.com/whiteboards/602faca5bb3c7a638f8c0805
{
"_id": "602faca5bb3c7a638f8c0805",
"name": "New whiteboard name",
"chat_dialog_id": "602f9ea20740a24ec238d9da",
"user_id": 8117,
"created_at": "2021-02-19T12:18:45.867Z",
"updated_at": "2021-02-19T12:34:45.765Z"
}

Delete a whiteboard by ID. Only creator can delete a whiteboard.

DELETE https://api.connectycube.com/whiteboards/{whiteboard_id}
Terminal window
curl -X DELETE \
-H "CB-Token: <TOKEN>" \
https://api.connectycube.com/whiteboards/602faca5bb3c7a638f8c0805
200 OK