Hi Vikas,
The API is an interface to your data on example.com. The API is used from your server to the example.com platform and can be used to List, Create, Edit or Delete items.
Webhooks are automated calls from example.com to your server triggered when a specific event happens in example.com. For example, when a task is completed and you want to know about it in real time we’ll make a POST request to the URL you have registered for the EVENT.COMPLETED webhook in your example account.
So, in a nutshell: The API is where you tell example.com things and Webhooks is where example.com tell you things.
Hope this helps you
Thanks