refactoring API create URL with recursion and event driven excellence!