added general post api function