create new flash message API in session storage