changed domain parameter to apidomain