How to perform external api call when a content type item is published and send data to external api?

I have looked into my project and it seems to work when I click on Publish.
Have you checked it by removing the config object?