I have create one api for edit the ContactData, but that api is called by default in every time
whenever i start my server and edit contact api called by default and its continue called and update the data.
Your app listens for when a contact's firstname changes through a webhook subscription.
If you receive a notification with "subscriptionType": "contact.propertyChange", then you trigger the editContactWebhook function.
My question is: Does editContactWebhook update data in HubSpot or your system? If it updates the contact's firstname in HubSpot, this will create a loop.
If I understand you correctly, your code is calling this endpoint every time you start your server. What should it be doing?
I will likely not be able to advise specifically on how to alter your code, but could you set up some trigger for conditions when the endpoint should be called?