Usually, to change a Lead's data via API, you need to know that Lead's ID, pass the ID parameter and the parameter of the field you want to change.
A simpler way to do this without needing to know the lead ID is to use the call "leadsbyfield".
Using "leadsbyfield" you will be able to search the Lead by Email, Whatsapp, Mobile, etc. Ideally it should be a UNIQUE field to avoid the risk of changing multiple Leads that have the same information.
Let's take Lead Bill Gates as an example.
Via API, we want to change Bill's first name to William. So we will use the alias "firstname"
In the Postman example below:
Method = PUT
URL = https://sprinthub-api-master.sprinthub.app/leadsbyfield/email/[email protected]?i=licenca&apitoken=XX
Don't forget to add the name of your license in "i" and your token in "apitoken".
When executed, the return should be success: true.
Now, just look at the Lead and you will see that the field was changed: