Call API to change worker state