# Create Room

`Starting with SBE 20.14, it is possible to create External chat rooms with view history enabled, depending on a pod parameter.`

## Create a new chatroom.

> Create a new chatroom.\
> \
> If no  attributes are specified, the room is created as a private chatroom.<br>

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v3/room/create":{"post":{"summary":"Create a new chatroom.","description":"Create a new chatroom.\n\nIf no  attributes are specified, the room is created as a private chatroom.\n","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true}],"tags":["Streams"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V3RoomDetail"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"Unavailable for Legal Reasons: Compliance Issues found in room creation request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V3RoomAttributes"}}},"required":true}}}},"components":{"schemas":{"V3RoomDetail":{"type":"object","properties":{"roomAttributes":{"$ref":"#/components/schemas/V3RoomAttributes"},"roomSystemInfo":{"$ref":"#/components/schemas/RoomSystemInfo"},"groups":{"description":"List of groups (aka SDLs) that were added to the room.","type":"array","items":{"$ref":"#/components/schemas/GroupItem"}}}},"V3RoomAttributes":{"type":"object","properties":{"name":{"type":"string","description":"Room name."},"keywords":{"type":"array","description":"Keywords for search to use to find this room","items":{"$ref":"#/components/schemas/RoomTag"}},"description":{"type":"string","description":"Room description."},"membersCanInvite":{"type":"boolean","description":"If true, any chatroom participant can add new participants. If false, only owners can add new participants."},"discoverable":{"type":"boolean","description":"If true, this chatroom (name, description and messages) can be searched and listed by non-participants. If false, only participants can search this room."},"public":{"type":"boolean","description":"If true, this is a public chatroom. IF false, a private chatroom."},"readOnly":{"type":"boolean","description":"If true, only stream owners can send messages."},"copyProtected":{"type":"boolean","description":"If true, clients disable the clipboard copy for content in this stream."},"crossPod":{"type":"boolean","description":"If true, this room is a cross pod room"},"viewHistory":{"type":"boolean","description":"If true, new members can view the room chat history of the room."},"multiLateralRoom":{"type":"boolean","description":"If true, this is a multi lateral room where we can find users belonging to more than 2 companies."},"scheduledMeeting":{"type":"boolean","description":"If true, this room is for a scheduled meeting."},"subType":{"type":"string","description":"This field is ignored when creating a new room as it was only used for email integration which is now sunset."},"pinnedMessageId":{"type":"string","description":"UrlSafe message id of the pinned message inside the room. To perform unpin operation, send an empty string."},"groupChat":{"type":"boolean","description":"If true, this room is a group chat. Note: this parameter is ignored for creating rooms. Since SBE 20.16."}}},"RoomTag":{"description":"Room Tag object. A key:value pair describing additional properties of the room.","properties":{"key":{"description":"A unique label of the Tag.","type":"string"},"value":{"description":"The value of this Tag's label.","type":"string"}},"required":["key","value"]},"RoomSystemInfo":{"type":"object","properties":{"id":{"type":"string"},"creationDate":{"type":"integer","format":"int64","description":"The datetime when the stream was originally created. Milliseconds since Jan 1 1970."},"createdByUserId":{"type":"integer","format":"int64"},"active":{"type":"boolean","description":"If false, no messages can be sent in this stream, and membership is locked."}}},"GroupItem":{"type":"object","properties":{"id":{"description":"The ID of the added group (aka SDL).","type":"integer","format":"int64"},"addedBy":{"description":"The user ID who added the group to the room.","type":"integer","format":"int64"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

*Starting with SBE 20.14, it is possible to create External chat rooms with view history enabled, depending on a pod parameter. See* [*Room Attributes*](https://rest-api.symphony.com/main/streams-conversations/room-endpoints/room-attributes-1) *for room creation parameters.*

> #### 🚧 More Information
>
> * Room names will be considered the same if they only differ in capitalization and whitespace. E.g. "room1" and "R O O M 1" are considered the same. Also, room names must be shorter than 50 characters.
> * `viewHistory`, `discoverable` and `membersCanInvite` attributes cannot be *false* if `public=true`.
> * `readOnly`, `public` and `discoverable` attributes cannot be *true* if `crossPod=true`.
> * When 'crossPod' is true, then `viewHistory` can be true ONLY if the pod entitlement canCreateExternalRoomSharedHistory is enabled.

> #### 📘 Overview of streams
>
> A stream is like a container for messages exchanged between two or more users via a given instant message (IM) or chat room. For more information, refer to [Overview of streams](https://docs.developers.symphony.com/building-bots-on-symphony/datafeed/overview-of-streams).

> #### 🚧 Entitlements
>
> * A user needs to have the entitlement `canCreatePublicRoom` if he wants to create a public room (User entitlements are set on Admin Portal).
> * A user needs to have the entitlement `isExternalRoomEnabled` if he wants to create a crosspod room (User entitlements are set on Admin Portal).
