# Update a chatroom by id **PATCH /chat/chatrooms/{id}** ## 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 #### Path parameters - **id** (integer) The chatroom id ## Body parameters Content-type: application/json - **established_dialogue** (string(date-time)) ## Responses ### 200: Return the updated chatroom #### Body Parameters: application/json (array[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 ### 404: Not found - The ambassador does not exist ### 422: Unprocessable Content #### Body Parameters: application/json (object) - **message** (string) Error message. - **errors** (object) [Powered by Bump.sh](https://bump.sh)