finalized api registration endpoint