We have custom fields for leads like UTM Source and UTM Medium.
I want to use the REST API to update these fields for leads.
I tried using the /rest/v1/leads.json endpoint with this request:
POST /rest/v1/leads.json HTTP/1.1
Content-Type: application/json
Authorization: Bearer TOKEN
{"action":"updateOnly","lookupField":"id","input":[{"id":LEAD_ID,"UTM Medium":"MEDIUM","UTM Source":"SOURCE"}]}
But I got this response saying the fields were not found:
{"requestId"=>"143e9#1497880b900",
"result"=>
[{"status"=>"skipped",
"reasons"=>
[{"code"=>"1006", "message"=>"Field 'UTM Medium' not found"},
{"code"=>"1006", "message"=>"Field 'UTM Source' not found"}]}],
"success"=>true}