Any person bound as surety upon any contract in writing for the payment of money or the performance of any act, when the right of action has accrued, may require by notice in writing the creditor or obligee forthwith to institute an action upon the contract.