added "apiClass" header and "apiClassHeader" parameter to the invoke() method

It didn't work without the header generally