endpoint model and post endpoint