Create Room
\ name : required The name of the room \ description : optional The description of the room \ pictureurl : optional The URL for a picture for the room \ moderation : optional \…
This method requires authentication.
* name: (required) The name of the room
* description: (optional) The description of the room
* pictureurl: (optional) The URL for a picture for the room
* moderation: (optional) ["pre"/"post"] Defaults to post-moderation.
* enableactions: (optional) [true/false] Turns action commands on or off
* enableenterandexit: (optional) [true/false] Turn enter and exit events on or off. Disable for large rooms to reduce noise.
* enableprofanityfilter: (optional) [default=true / false] Enables profanity filtering.
* enableautoexpiresessions: (optional) [defaulttrue / false] Enables automatically expiring idle sessions, which removes inactive users from the room.
* delaymessageseconds: (optional) [default=0] Puts a delay on messages from when they are submitted until they show up in the chat. Used for throttling.
* roomisopen: (optional) [true/false] If false, users cannot perform any commands in the room, chat is suspended.
* maxreports: (optional) Default is 3. This is the maximum amount of user reported flags that can be applied to a message before it is sent to the moderation queue.
* customid: (optional) A customid for the room. Can be unused, or a unique key.
* customtype : (optional) Custom type string.
* custompayload : (optional) Custom payload string.
* customfield1 : (optional) User custom field 1. Store any string value you want here, limit 1024 bytes.
* customfield2 : (optional) User custom field 2. Store any string value you want here, limit 1024 bytes.
* customtags : (optional) A comma delimited list of tags
* private: (false | optional) If set to true a user cannot join this room unless explicitly granted with a call to the Set User Permission API.
Parameters
Values in the path and query string.
appid path The TalkLabs application ID assigned to your account.
Example:your-app-id JSON body
Send as application/json.
name userId The customer defined user ID from your application or identity system.
description pictureUrl moderation Defaults to postmoderation
maxReports enableActions enableEnterAndExit enableProfanityFilter enableAutoExpireSessions delayMessageSeconds roomIsOpen privateRoom If TRUE set this to a private room, if false make it a public room
customType customId A customer defined ID chosen by your application. TalkLabs stores it so you can retrieve the resource without keeping its TalkLabs ID.
customPayload customField1 customField2 customTags {
"name": "New York City Chat (Post-Moderated)",
"description": "Live from the top of the Empire State Building",
"moderation": "post"
} Common variations
Historical examples filtered through the current request schema.
Create Room (Postmoderated)
{
"name": "New York City Chat (Post-Moderated)",
"description": "Live from the top of the Empire State Building",
"moderation": "post"
} Create Room (Premoderated)
{
"name": "Tokyo Lounge",
"description": "Live from Tokyo (Pre-Moderated)",
"moderation": "pre"
} Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 500 Internal Server Error ApiResult {
"message": "Success",
"errors": {},
"data": {
"kind": "chat.room",
"id": "5ec3c1945617e21bd8c5567b",
"appid": "5ebbe03d5617e00de4b044c2",
"ownerid": "userid_abe",
"name": "New York City Chat (Post-Moderated)",
"description": "Live from the top of the Empire State Building",
"customtype": "",
"customid": "new-york-city-club",
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"enableactions": true,
"enableenterandexit": true,
"open": true,
"inroom": 0,
"added": "2020-05-19T11:23:00.3049587Z",
"whenmodified": "2020-05-20T03:52:34.5114855Z",
"moderation": "post",
"maxreports": 0,
"enableprofanityfilter": true,
"delaymessageseconds": 0
}
}