Can I use a flow to implement an API?

I would like to treat the flow as the implementation of my API. In other words, I define an interface, and the invocation of that interface triggers the flow, then the end returns the API response payload. The flow designer talks about triggering the flow with a webhook, but I am not sure if that has the same effect.