Skip to main content
November 4, 2014
Question

Using the REST API to update leads, got "field not found" error

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}
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

November 4, 2014
Solved: I had to find the actual field name by going to Admin > Field Management.

See https://community.marketo.com/MarketoArticle?id=kA050000000LNKJCA4
Translate
November 4, 2014
You can also use the Describe REST API to get a list of field names.
Translate