PATCH /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.

Servers

Path parameters

Name Type Required Description
id String Yes

The ID of the lead

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
person_id Integer No

The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both.

visible_to String No

The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups here.

Essential / Advanced plan

ValueDescription
1Owner & followers
3Entire company

Professional / Enterprise plan

ValueDescription
1Owner only
3Owner's visibility group
5Owner's visibility group and sub-groups
7Entire company

Possible values:

  • "3"
  • "1"
  • "7"
  • "5"
was_seen Boolean No

A flag indicating whether the lead was seen by someone in the Pipedrive UI

channel Integer No

The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields.

channel_id String No

The optional ID to further distinguish the Marketing channel.

title String No

The name of the lead

label_ids[] Array No

The IDs of the lead labels which will be associated with the lead

value Object No

The potential value of the lead represented by a JSON object: { "amount": 200, "currency": "EUR" }. Both amount and currency are required.

value.amount Number Yes
value.currency String Yes
organization_id Integer No

The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both.

expected_close_date String No

The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD.

owner_id Integer No

The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used.

is_archived Boolean No

A flag indicating whether the lead is archived or not

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.