register api works