upgrade api handler