adding create invite api handler