Any surety company chartered by this state or authorized to do business herein may be accepted as surety or recognizor upon any bond or recognizance required by law in any civil action or in any proceeding instituted under the statutes of this state. In any action where a bond or recognizance is by law required, the bond of the company, duly executed and conditioned for the performance of the obligations expressed in the bond or recognizance, may be accepted by the person having authority thereto, and shall be filed by him in the court to which the action or proceeding is returnable or pending.