How to setting up Failure Mode for route using API?

Hi you all,
as you know when adding a new route from the web interface you can choose two failure modes: fail closed or fail open.

Is there a way to specify the failure mode to use when creating a new route via API? Or a way to change it after the route creation?

Regards

No way?