add API to chatroom example