API to create chatroom

Using the following endpoint to create the chat room:





	"name": "chatroom name",
	"description": "chat room description",
	"passwordProtected": false,
	"roomPassword": "password",
	"mainColor": "#hexcolor",
	"sidebarColor": "hexColor",
	"hideInviteButton": false,
	"preModeratedChatRoom": false,
	"customCSS": "",
	"enableLikeMessage": "on"



    "success": true,
    "roomId": "FQAgkE2fA",
    "url": "https://deadsimplechat.com/FQAgkE2fA"

Javascript Code Sample:

  method: "POST",
  url: " https://deadsimplechat.com/consumer/api/v1/chatroom?auth=replace_with_authtoken",
  data: {
	"name": "chatroom name",
	"description": "chat room description",
	"passwordProtected": "on",
	"roomPassword": "password",
	"mainColor": "#f8f8f8",
	"sidebarColor": "#00000",
	"hideInviteButton": false,
	"preModeratedChatRoom": "on",
	"enableOneToOneChat": "on",
	"moderatorOnlyOneToOneChat": "on",
	"fileSharingMode": "imageSharing", // "" or "imageSharing" or "fileAndImageSharing"
	"customCSS": "#already-have-account span {display: none;}"
}).then(function(success) {
}).catch(function(ex) {
  console.log("Error", ex.responseJSON)

Customisation Options

You can pass the "customization" object to further customize the chatroom settings, these options are the same that are available in the customize tab of the chat room settings page.

  "name": "chatroom name",
  "description": "chat room description",
  "passwordProtected": false,
  "roomPassword": "password",
  "mainColor": "#hexcolor",
  "sidebarColor": "hexColor",
  "hideInviteButton": false,
  "preModeratedChatRoom": false,
  "customCSS": "",
  "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": ""


All the font-size values are in px.

  "name": "chatroom name",
  "description": "chat room description",
  "passwordProtected": false,
  "roomPassword": "password",
  "mainColor": "#hexcolor",
  "sidebarColor": "hexColor",
  "hideInviteButton": false,
  "preModeratedChatRoom": false,
  "customCSS": "",
  "customization": {
    "backgroundColor": "#b06d6d",
    "buttonColor": "#1a72d5",
    "buttonHoverColor": "#29609e",
    "buttonTextColor": "#f0ebeb",
    "chatMessageColor": "#c27a7a",
    "chatMessageFont": "Roboto",
    "chatMessageHoverColor": "#d4c9c9",
    "chatUnapprovedMessageBackgroundColor": "#cfcfbf",
    "collapseSidebar": true,
    "fontFamily": "Roboto",
    "fontSize": "12",
    "headerBackgroundColor": "#b06d6d",
    "headerFontSize": 20,
    "headerTextColor": "#dbbdbd",
    "hideClaimAndEditProfileButtons": true,
    "hideEmojiPicker": true,
    "hideHeader": true,
    "hideInviteUserButton": true,
    "hideLoginFields": true,
    "hideMarkdownSuggestions": true,
    "hideNotificationButton": true,
    "hideOnlineUserCounter": true,
    "hideOnlineUsersList": true,
    "hideProfilePics": true,
    "hideSidebar": true,
    "modalBackgroundColor": "#b06d6d",
    "modalFont": "Open Sans",
    "modalFontColor": "#dbbdbd",
    "modalHeadingFontSize": "12",
    "modalLabelFontSize": "12",
    "sendButtonBackgroundColor": "#bfe8cd",
    "sendButtonIconColor": "#ededed",
    "sidebarColor": "#d7d4e2",
    "sidebarHeadingTextColor": "#a39595",
    "sidebarTextColor": "#c0afaf",
    "textColor": "#dbbdbd",
    "textareaBackgroundColor": "#d2d0d0",
    "textareaBorderColor": "#2e2e2e",
    "textareaFontSize": "10",
    "timestampFont": "Roboto",
    "timestampFontSize": "13",
    "useCustomFont": false,
    "usernameFont": "Roboto",
    "usernameFontSize": "12"

Translation Options

You can pass translation or replace text with your own custom text when creating chat room, all the test options are also available in the Translate on the Edit Chat Room Page.

  "autoScrollPaused": "",
  "resumeAutoScroll": "",
  "editProfile": "",
  "claimProfile": "",
  "verifyProfile": "",
  "channels": "",
  "unread": "",
  "privateChats": "",
  "onlineUsers": "",
  "ban": "",
  "loadMore": "",
  "logout": "",
  "bannedUsers": "",
  "newMessage": "",
  "moderator": "",
  "download": "",
  "adminApprovalPending": "",
  "approve": "",
  "typeAMessage": "",
  "joinChats": "",
  "moderatorLogin": "",
  "errorUsernameNotSpecified": "",
  "joinRoom": "",
  "alreadyHaveAnAccount": "",
  "infoSuperAdmin": "",
  "infoModeratorLogin": "",
  "login": "",
  "setAUsername": "",
  "username": "",
  "yourEmail": "",
  "email": "",
  "password": "",
  "setSuperAdminUsername": "",
  "superAdminUsernameMessage": "",
  "banUserHeading": "",
  "banUserMessage": "",
  "banUserConfirm": "",
  "banUserCancel": "",
  "userBannedHeading": "",
  "userBannedMessage": "",
  "bannedIPs": "",
  "add": "",
  "ipAddress": "",
  "unblock": "",
  "close": "",
  "addIPAddress": ""

Code Sample:

Here is an example payload,  to create a chatroom with Spanish text

  method: "POST",
  url: " https://deadsimplechat.com/consumer/api/v1/chatroom?auth=replace_with_authtoken",
  data: {
  "name": "A Customised chatroom",
  "description": "This chatroom has been created with the api!",
  "passwordProtected": false,
  "hideInviteButton": true,
  "preModeratedChatRoom": "on",
  "translation": {
  "autoScrollPaused": "Autodesplazamiento en pausa",
  "resumeAutoScroll": "Reanudar desplazamiento",
  "editProfile": "Editar perfil",
  "claimProfile": "Perfil de reclamo",
  "verifyProfile": "verificar perfil",
  "channels": "Canales",
  "unread": "no leído",
  "privateChats": "Chats privados",
  "onlineUsers": "Usuarios en linea",
  "ban": "prohibición",
  "loadMore": "Carga más",
  "logout": "Cerrar sesión",
  "bannedUsers": "Usuarios prohibidos",
  "newMessage": "Nuevo mensaje",
  "moderator": "moderador",
  "download": "descargar",
  "adminApprovalPending": "Aprobación del administrador pendiente",
  "approve": "aprobar",
  "typeAMessage": "Escribe un mensaje",
  "joinChats": "Unirse al chat",
  "moderatorLogin": "Moderador Iniciar sesión",
  "errorUsernameNotSpecified": "Debe establecer un nombre de usuario para unirse a la sala de chat.",
  "joinRoom": "Unirse a la habitación",
  "alreadyHaveAnAccount": "Ya tienes una cuenta?",
  "infoSuperAdmin": "Nota: Esta ventana emergente solo se le muestra porque ya ha iniciado sesión en el panel de administración.",
  "infoModeratorLogin": "Si desea iniciar sesión como moderador, abra esta página en una ventana de incógnito o cierre la sesión de deadsimplechat y luego abra esta página.",
  "login": "acceso",
  "setAUsername": "Establecer un nombre de usuario",
  "username": "nombre de usuario",
  "yourEmail": "Tu correo Email",
  "email": "Email",
  "password": "contraseña",
  "setSuperAdminUsername": "Establezca su nombre de usuario de superadministrador",
  "superAdminUsernameMessage": "El nombre de usuario de superadministrador se utilizará en todas sus salas de chat.",
  "banUserHeading": "Ban user",
  "banUserMessage": "Estás seguro de que deseas bloquear al usuario? Puede des-banear al usuario haciendo clic en el botón Usuarios prohibidos y eliminando la entrada para el usuarior",
  "banUserConfirm": "Confirmar",
  "banUserCancel": "Cancelar",
  "userBannedHeading": "Prohibido",
  "userBannedMessage": "Estás baneado, por lo tanto, no puedes unirte a esta sala de chat.",
  "bannedIPs": "IP prohibidas",
  "add": "añadir",
  "ipAddress": "dirección IP",
  "unblock": "desatascar",
  "close": "cerca",
  "addIPAddress": "Agregar dirección IP"
}).then(function(success) {
}).catch(function(ex) {
  console.log("Error", ex.responseJSON)
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us