Elevance Health Inc. is trying to keep a major contract to provide health benefits for New York City public employees by arguing the city was “arbitrary and capricious” when it gave the lucrative award to its rivals.

The contract to manage billions in public spending is supposed to switch over Jan. 1. Elevance has been fighting to keep it for almost two years in litigation that a state court has kept under seal. Now, an appeal that was briefly made public has revealed for the first time Elevance’s protest over how the decision was made.