before_taking api add