Add class checks for api endpoints