Ivory Coast will gradually withdraw its contribution of military and police from a United Nations peacekeeping force in Mali, according to a letter by its ambassador to the U.N., after Bamako detained 46 of its soldiers in July.