changing category to apiCategory and broadcasting apiCategoryChange event