# Create a chatroom **POST /chat/chatrooms** ## Servers - https://domain.tld/api/v2: https://domain.tld/api/v2 () ## Authentication methods - Bearer token ## Parameters #### Headers - **X-Popsell-Brand** (integer) The id of the target brand ## Body parameters Content-type: application/json - **ids_ambassadors** (array[integer]) Array of ambassador IDs. Must contain exactly two elements. Note: Either 'ids_ambassadors' or 'id_brand_tag' is required, but not both or none. - **id_brand_tag** (integer) ID of the brand tag to be associated with the chatroom. Note: Either 'ids_ambassadors' or 'id_brand_tag' is required, but not both or none. - **source** (integer) Source of the chatroom. ## Responses ### 201: Return the created chatroom #### Body Parameters: application/json (object) - **id_chatroom** (integer) - **ambassadors** (array[object]) - **date_insert** (string(date-time)) - **last_message_date** (string(date-time)) - **type_chatroom** (integer) 0: one to one , 7: one to many - **type_discussion** (integer) 0: between members, 1: between external, 2: between members and external - **source** (string) 0:direct, 1:waiting_list, 2:hot_list - **established_dialogue** (string(date-time)) true: chatrooms with at least two authors, false: chatrooms with only one author - **last_rating** (object) - **last_summary** (object) ### 401: Unauthorized. #### Body Parameters: application/json (object) - **message** (string) ### 403: Forbidden - You don't have permission to access this route ### 422: Unprocessable Content #### Body Parameters: application/json (object) - **message** (string) Error message. - **errors** (object) [Powered by Bump.sh](https://bump.sh)