api content-type refactoring