How to update contact email via API?

Hi All
I am using this code but the update does really work:

and I should be using this instead maybe:

Could you help me?

Hello @bluescreen1,

To update a Contact’s email address via the API you can use the Contact Update endpoint. This endpoint requires the ID of the Contact that you will be updating. There are a number of ways to retrieve this ID. One way to find it with the API is to use the Contacts List endpoint and search based on the existing email address. I hope this helps point you in the right direction!

Thanks,
-Matt