Updating custom fields of Leads
I store leads and get get leads by, for example, email by making a GET request to /rest/v1/leads.json?filterType=email&filterValues=example@example.com endpoint. I get the following as a result:
From here I can get the id of a lead. So I want to update a custom field this lead has (let's call it allowedToEmail). I can also get details about it by making a GET request to /rest/v1/leads/describe.json endpoint:
What I want is to update its value to false, making a POST request to /rest/v1/leads.json with the following body does is not working:
{
"action": "updateOnly",
"input": [
{
"id": 4788743,
"allowedToEmail": false
}
]
}
Any ideas on how this can be achieved? I greatly appreciate your help.