Add handler to api file, fix handler import