API to create chatroom

Using the following endpoint to create the chat room:

URL:

https://deadsimplechat.com/consumer/api/v1/chatroom?auth=<auth_token>

HTTP METHOD: POST

BODY:

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

Response:

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

Javascript Code Sample:

$.ajax({
  method: "POST",
  url: " https://deadsimplechat.com/consumer/api/v1/chatroom?auth=replace_with_authtoken",
  data: {
	"name": "chatroom name",
	"description": "chat room description",
	"passwordProtected": false,
	"roomPassword": "password",
	"mainColor": "#f8f8f8",
	"sidebarColor": "#00000",
	"hideInviteButton": false,
	"preModeratedChatRoom": false,
	"customCSS": "#already-have-account span {display: none;}"
}).then(function(success) {
  console.log(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