Leads are potential deals stored in Leads Inbox before they are archived or converted to a deal. Each lead needs to be named (using the title
field) and be linked to a person or an organization. In addition to that, a lead can contain most of the fields a deal can (such as value
or expected_close_date
).
/v1/leads
Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using limit
and start
query parameters. 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.
limit
integer
For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
start
integer
For pagination, the position that represents the first result for the page
archived_status
string
Filtering based on the archived status of a lead. If not provided, All
is used.
Values
archived
not_archived
all
owner_id
integer
If supplied, only leads matching the given user will be returned. However, filter_id
takes precedence over owner_id
when supplied.
person_id
integer
If supplied, only leads matching the given person will be returned. However, filter_id
takes precedence over person_id
when supplied.
organization_id
integer
If supplied, only leads matching the given organization will be returned. However, filter_id
takes precedence over organization_id
when supplied.
filter_id
integer
The ID of the filter to use
sort
string
The field names and sorting mode separated by a comma (field_name_1 ASC
, field_name_2 DESC
). Only first-level field keys are supported (no nested keys).
Values
id
title
owner_id
creator_id
was_seen
expected_close_date
next_activity_id
add_time
update_time
OK
/v1/leads/{id}
Returns details of a specific lead. 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.
id
string
required
The ID of the lead
Format
uuid
OK
/v1/leads/{id}/permittedUsers
Lists the users permitted to access a lead.
id
string
required
The ID of the lead
OK
/v1/leads/search
Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
term
string
required
The search term to look for. Minimum 2 characters (or 1 if using exact_match
). Please note that the search term has to be URL encoded.
fields
string
A comma-separated string array. The fields to perform the search from. Defaults to all of them.
Values
custom_fields
notes
title
exact_match
boolean
When enabled, only full exact matches against the given term are returned. It is not case sensitive.
Values
true
false
person_id
integer
Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
organization_id
integer
Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
include_fields
string
Supports including optional fields in the results which are not provided by default
Values
lead.was_seen
start
integer
Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items
parameter.
Default
0
limit
integer
Items shown per page
OK
/v1/leads
Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source API
assigned. Here's the tutorial for adding a lead. 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.
application/json
title
string
required
The name of the lead
owner_id
integer
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.
label_ids
array
The IDs of the lead labels which will be associated with the lead
person_id
integer
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. This property is required unless organization_id
is specified.
organization_id
integer
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. This property is required unless person_id
is specified.
value
object
The potential value of the lead
expected_close_date
string
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.
Format
date
visible_to
string
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.
Value | Description |
---|---|
1 | Owner & followers |
3 | Entire company |
Value | Description |
---|---|
1 | Owner only |
3 | Owner's visibility group |
5 | Owner's visibility group and sub-groups |
7 | Entire company |
Values
1
3
5
7
was_seen
boolean
A flag indicating whether the lead was seen by someone in the Pipedrive UI
Values
true
false
Created
/v1/leads/{id}
Deletes a specific lead.
id
string
required
The ID of the lead
Format
uuid
OK
/v1/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.
id
string
required
The ID of the lead
Format
uuid
application/json
title
string
The name of the lead
owner_id
integer
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.
label_ids
array
The IDs of the lead labels which will be associated with the lead
person_id
integer
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.
organization_id
integer
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.
is_archived
boolean
A flag indicating whether the lead is archived or not
value
object
The potential value of the lead
expected_close_date
string
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.
Format
date
visible_to
string
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.
Value | Description |
---|---|
1 | Owner & followers |
3 | Entire company |
Value | Description |
---|---|
1 | Owner only |
3 | Owner's visibility group |
5 | Owner's visibility group and sub-groups |
7 | Entire company |
Values
1
3
5
7
was_seen
boolean
A flag indicating whether the lead was seen by someone in the Pipedrive UI
Values
true
false
OK