Update a lead

PATCH {{baseUrl}}/leads/:id

Updates one or more properties of a lead. Only properties included in the request will be updated. Send null to unset a property (applicable for example for value, person_id or organization_id). If a lead contains custom fields, the fields' values will be included in the response in the same format as with the Deals endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. See an example given in the updating custom fields’ values tutorial.

Request Body

{"title"=>"<string>", "owner_id"=>"<integer>", "label_ids"=>["<uuid>", "<uuid>"], "person_id"=>"<integer>", "organization_id"=>"<integer>", "is_archived"=>"<boolean>", "value"=>{"amount"=>"<number>", "currency"=>"<string>"}, "expected_close_date"=>"<date>", "visible_to"=>"<string>", "was_seen"=>"<boolean>", "channel"=>"<integer>", "channel_id"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:&quot;adf21080-0e10-11eb-879b-05d71fb426ec&quot;,&quot;title&quot;:&quot;Jane Doe Lead&quot;,&quot;owner_id&quot;:1,&quot;creator_id&quot;:1,&quot;label_ids&quot;:[&quot;f08b42a0-4e75-11ea-9643-03698ef1cfd6&quot;,&quot;f08b42a1-4e75-11ea-9643-03698ef1cfd6&quot;],&quot;person_id&quot;:1092,&quot;organization_id&quot;:null,&quot;source_name&quot;:&quot;API&quot;,&quot;origin&quot;:&quot;API&quot;,&quot;origin_id&quot;:null,&quot;channel&quot;:52,&quot;channel_id&quot;:&quot;Jun23 Billboards&quot;,&quot;is_archived&quot;:false,&quot;was_seen&quot;:false,&quot;value&quot;:{&quot;amount&quot;:999,&quot;currency&quot;:&quot;USD&quot;},&quot;expected_close_date&quot;:null,&quot;next_activity_id&quot;:1,&quot;add_time&quot;:&quot;2020-10-14T11:30:36.551Z&quot;,&quot;update_time&quot;:&quot;2020-10-14T11:30:36.551Z&quot;,&quot;visible_to&quot;:&quot;3&quot;,&quot;cc_email&quot;:&quot;company+1+leadntPaYKA5QRxXkh6WMNHiGh@dev.pipedrivemail.com&quot;}}