Defining API for Posts