Upon those contracts of indemnity which are taken in legal proceedings, as security for the performance of an obligation imposed or declared by the tribunals, and known as undertakings or recognizances, the sureties are called bail.
Okla. Stat. tit. 15, § 429