How to call an external API from bonitasoft task and complete it

I need to make a request to an external API and based on the response finish or not the task.
How can achieve this?

Hi,

Like Roy said, it will depends of the nature of the so called API.
If it is an HTTP/REST Api, there is a REST Connector available in the extension marketplace (Project Overview > Extension > Open Marketplace)
Otherwise, you may implement your own custom connector.

HTH
Romain