Skip to main content

Create Chat Room


https://api.deadsimplechat.com/consumer/api/v1/chatroom

Create Chat Room

This endpoint allows you to create a chat room

ParametersDescription
Query
authstringauth token
Body
customizationobjectsee below for details
customCssstringCustom css you want to pass to the chat room
defaultNotificationEnabledstring"on" or "off". When on then notification sound is enabled by default, when off the notification sound is disabled by default
fileSharingModestringblank or imageSharing or fileAndImageSharing. Can be blank if blank then fileSharing is disabled. If imageSharing then only images can be shared in the chatRoom, fileAndImageSharing then images and files can be shared in the chatRoom.
enableChnnelsstring"on" or "off". When on, channels are enabled in the chatroom.
moderatorOnlyOneToOneChatstring"on" or "off", When "on" only moderators can have 1-1 chat with participants
enableOneToOneChatstring"on" or "off", When "on" then One to One Private Chat is enabled in the Chatroom
preModeratedChatRoomstring"on" or "off", When it is "on" then Pre-Moderated Chat is enabled in the chat room
roomPasswordstringif passwordProtected is on then this value becomes required. This is the password of the room
passwordProtectedstringon or off
descriptionstringdescription of the chat room
namestringname of the chatroom

Responses

200

JSON

{
"success": true,
"roomId": "bbNiVFoXm",
"url": "https://deadsimplechat.com/bbNiVFoXm"
}

404

JSON

{
"error": {
"_original": {
"name": "Sample Chat Room",
"description": "Chat Room Created using API",
"passwordProtected": "on",
"mainColor": "#FFFFF",
"sidebarColor": "#281576",
"hideInviteButton": false,
"preModeratedChatRoom": false,
"fileSharingMode": "imageSharing",
"enableLikeMessage": "on",
"customization": {
"chatMessageFont": "20px"
}
},
"details": [
{
"message": "\"roomPassword\" is required",
"path": [
"roomPassword"
],
"type": "any.required",
"context": {
"label": "roomPassword",
"key": "roomPassword"
}
}
]
}
}

customization object can be passed to customize the chat room user interface, it has the following keys

JSON
   customization: {
"sidebarColor": "",
"backgroundColor": "",
"textColor": "",
"fontFamily": "",
"useCustomFont": "",
"fontSize": "",
"hideOnlineUsersList": "",
"hideOnlineUserCounter": "",
"hideEmojiPicker": "",
"hideMarkdownSuggestions": "",
"hideProfilePics": "",
"hideClaimAndEditProfileButtons": "",
"hideNotificationButton": "",
"hideLoginFields": "",
"hideHeader": "",
"hideSidebar": "",
"collapseSidebar": "",
"sidebarTextColor": "",
"chatMessageColor": "",
"chatUnapprovedMessageBackgroundColor": "",
"buttonColor": "",
"buttonHoverColor": "",
"buttonTextColor": "",
"chatMessageFont": "",
"usernameFont": "",
"modalFont": "",
"timestampFont": "",
"sendButtonIconColor": "",
"sendButtonBackgroundColor": "",
"textareaBackgroundColor": "",
"textareaBorderColor": "",
"textareaFontSize": "",
"chatMessageHoverColor": "",
"usernameFontSize": "",
"timestampFontSize": "",
"sidebarHeadingTextColor": "",
"headerBackgroundColor": "",
"headerTextColor": "",
"headerFontSize": "",
"modalBackgroundColor": "",
"modalFontColor": "",
"modalHeadingFontSize": "",
"modalLabelFontSize": ""
}