api methods now take a config object