Prefect 1.0 has a GraphQL API
Prefect 2.0 has a REST API
If you want to trigger a flow run via API request, check
this topic on Discourse
And if you want to get notifications on failures,
this blog post discusses Automations and State Handlers as the two most common ways to do that, including examples