Correctly pass config to api