add api route for posts