Get api calls to function and add messages model