All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addPerson | POST /persons | Add a person |
addPersonFollower | POST /persons/{id}/followers | Add a follower to a person |
addPersonPicture | POST /persons/{id}/picture | Add person picture |
deletePerson | DELETE /persons/{id} | Delete a person |
deletePersonFollower | DELETE /persons/{id}/followers/{follower_id} | Delete a follower from a person |
deletePersonPicture | DELETE /persons/{id}/picture | Delete person picture |
deletePersons | DELETE /persons | Delete multiple persons in bulk |
getPerson | GET /persons/{id} | Get details of a person |
getPersonActivities | GET /persons/{id}/activities | List activities associated with a person |
getPersonChangelog | GET /persons/{id}/changelog | List updates about person field values |
getPersonDeals | GET /persons/{id}/deals | List deals associated with a person |
getPersonFiles | GET /persons/{id}/files | List files attached to a person |
getPersonFollowers | GET /persons/{id}/followers | List followers of a person |
getPersonMailMessages | GET /persons/{id}/mailMessages | List mail messages associated with a person |
getPersonProducts | GET /persons/{id}/products | List products associated with a person |
getPersonUpdates | GET /persons/{id}/flow | List updates about a person |
getPersonUsers | GET /persons/{id}/permittedUsers | List permitted users |
getPersons | GET /persons | Get all persons |
getPersonsCollection | GET /persons/collection | Get all persons (BETA) |
mergePersons | PUT /persons/{id}/merge | Merge two persons |
searchPersons | GET /persons/search | Search persons |
updatePerson | PUT /persons/{id} | Update a person |
AddPersonResponse addPerson(opts)
Add a person
Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.<br>If a company uses the Campaigns product, then this endpoint will also accept and return the `data.marketing_status` field.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let opts = Pipedrive.NewPerson.constructFromObject({
// Properties that you want to update
});
apiInstance.addPerson(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
NewPerson | NewPerson | [optional] |
- Content-Type: application/json
- Accept: application/json
AddFollowerToPersonResponse addPersonFollower(id, opts)
Add a follower to a person
Adds a follower to a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
let opts = Pipedrive.AddPersonFollowerRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addPersonFollower(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
AddPersonFollowerRequest | AddPersonFollowerRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
AddPersonPictureResponse addPersonPicture(id, file, opts)
Add person picture
Adds a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
let file = "/path/to/file"; // File | One image supplied in the multipart/form-data encoding
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'cropX': 56, // Number | X coordinate to where start cropping form (in pixels)
'cropY': 56, // Number | Y coordinate to where start cropping form (in pixels)
'cropWidth': 56, // Number | The width of the cropping area (in pixels)
'cropHeight': 56 // Number | The height of the cropping area (in pixels)
};
apiInstance.addPersonPicture(id, file, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
file | File | One image supplied in the multipart/form-data encoding | |
crop_x | Number | X coordinate to where start cropping form (in pixels) | [optional] |
crop_y | Number | Y coordinate to where start cropping form (in pixels) | [optional] |
crop_width | Number | The width of the cropping area (in pixels) | [optional] |
crop_height | Number | The height of the cropping area (in pixels) | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
DeletePersonResponse deletePerson(id)
Delete a person
Marks a person as deleted. After 30 days, the person will be permanently deleted.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
apiInstance.deletePerson(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person |
- Content-Type: Not defined
- Accept: application/json
DeletePersonResponse deletePersonFollower(id, followerId)
Delete a follower from a person
Deletes a follower from a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
let followerId = 56; // Number | The ID of the follower
apiInstance.deletePersonFollower(id, followerId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
follower_id | Number | The ID of the follower |
- Content-Type: Not defined
- Accept: application/json
DeletePersonResponse deletePersonPicture(id)
Delete person picture
Deletes a person’s picture.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
apiInstance.deletePersonPicture(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person |
- Content-Type: Not defined
- Accept: application/json
DeletePersonsInBulkResponse deletePersons(ids)
Delete multiple persons in bulk
Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let ids = "ids_example"; // String | The comma-separated IDs that will be deleted
apiInstance.deletePersons(ids).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ids | String | The comma-separated IDs that will be deleted |
- Content-Type: Not defined
- Accept: application/json
GetPersonDetailsResponse getPerson(id)
Get details of a person
Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.<br>If a company uses the Campaigns product, then this endpoint will also return the `data.marketing_status` field.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
apiInstance.getPerson(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person |
- Content-Type: Not defined
- Accept: application/json
ListActivitiesResponse getPersonActivities(id, opts)
List activities associated with a person
Lists activities associated with a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'done': new Pipedrive.NumberBoolean(), // NumberBoolean | Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
'exclude': "exclude_example" // String | A comma-separated string of activity IDs to exclude from result
};
apiInstance.getPersonActivities(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
done | NumberBoolean | Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. | [optional] |
exclude | String | A comma-separated string of activity IDs to exclude from result | [optional] |
- Content-Type: Not defined
- Accept: application/json
ChangelogResponse getPersonChangelog(id, opts)
List updates about person field values
Lists updates about field values of a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'cursor': "cursor_example", // String | For pagination, the marker (an opaque string value) representing the first item on the next page
'limit': 56 // Number | Items shown per page
};
apiInstance.getPersonChangelog(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
cursor | String | For pagination, the marker (an opaque string value) representing the first item on the next page | [optional] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListDealsResponse getPersonDeals(id, opts)
List deals associated with a person
Lists deals associated with a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'status': "'all_not_deleted'", // String | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
'sort': "sort_example" // 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).
};
apiInstance.getPersonDeals(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
status | String | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | [optional] [default to 'all_not_deleted'] |
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). | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListFilesResponse getPersonFiles(id, opts)
List files attached to a person
Lists files associated with a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'sort': "sort_example" // 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). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
};
apiInstance.getPersonFiles(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
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). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListFollowersResponse getPersonFollowers(id)
List followers of a person
Lists the followers of a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
apiInstance.getPersonFollowers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person |
- Content-Type: Not defined
- Accept: application/json
ListMailMessagesResponse getPersonMailMessages(id, opts)
List mail messages associated with a person
Lists mail messages associated with a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getPersonMailMessages(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListPersonProductsResponse getPersonProducts(id, opts)
List products associated with a person
Lists products associated with a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getPersonProducts(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
PersonFlowResponse getPersonUpdates(id, opts)
List updates about a person
Lists updates about a person.<br>If a company uses the Campaigns product, then this endpoint's response will also include updates for the `marketing_status` field.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'allChanges': "allChanges_example", // String | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
'items': "items_example" // String | A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
};
apiInstance.getPersonUpdates(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
all_changes | String | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. | [optional] |
items | String | A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListPermittedUsersResponse1 getPersonUsers(id)
List permitted users
List users permitted to access a person.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
apiInstance.getPersonUsers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person |
- Content-Type: Not defined
- Accept: application/json
GetAllPersonsResponse getPersons(opts)
Get all persons
Returns all persons.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'userId': 56, // Number | If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
'filterId': 56, // Number | The ID of the filter to use
'firstChar': "firstChar_example", // String | If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'sort': "sort_example" // 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).
};
apiInstance.getPersons(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
user_id | Number | If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. | [optional] |
filter_id | Number | The ID of the filter to use | [optional] |
first_char | String | If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
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). | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2002 getPersonsCollection(opts)
Get all persons (BETA)
Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target="_blank" rel="noopener noreferrer">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management\" target="_blank" rel="noopener noreferrer">here</a>.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'cursor': "cursor_example", // String | For pagination, the marker (an opaque string value) representing the first item on the next page
'limit': 100, // Number | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
'since': "since_example", // String | The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
'until': "until_example", // String | The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
'ownerId': 56, // Number | If supplied, only persons owned by the given user will be returned
'firstChar': "firstChar_example" // String | If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
};
apiInstance.getPersonsCollection(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
cursor | String | For pagination, the marker (an opaque string value) representing the first item on the next page | [optional] |
limit | Number | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. | [optional] |
since | String | The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. | [optional] |
until | String | The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. | [optional] |
owner_id | Number | If supplied, only persons owned by the given user will be returned | [optional] |
first_char | String | If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
- Content-Type: Not defined
- Accept: application/json
MergePersonsResponse mergePersons(id, opts)
Merge two persons
Merges a person with another person. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/merging-two-persons\" target="_blank" rel="noopener noreferrer">merging two persons</a>.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
let opts = Pipedrive.MergePersonsRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.mergePersons(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
MergePersonsRequest | MergePersonsRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
PersonSearchResponse searchPersons(term, opts)
Search persons
Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let term = "term_example"; // String | 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.
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'fields': "fields_example", // String | A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
'exactMatch': true, // Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
'organizationId': 56, // Number | Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
'includeFields': "includeFields_example", // String | Supports including optional fields in the results which are not provided by default
'start': 0, // Number | Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
'limit': 56 // Number | Items shown per page
};
apiInstance.searchPersons(term, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
term | String | 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. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target="_blank" rel="noopener noreferrer">here</a>. | [optional] |
exact_match | Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | [optional] |
organization_id | Number | Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. | [optional] |
include_fields | String | Supports including optional fields in the results which are not provided by default | [optional] |
start | Number | Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
UpdatePersonResponse updatePerson(id, opts)
Update a person
Updates the properties of a person. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/updating-a-person\" target="_blank" rel="noopener noreferrer">updating a person</a>.<br>If a company uses the Campaigns product, then this endpoint will also accept and return the `data.marketing_status` field.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi(apiClient);
let id = 56; // Number | The ID of the person
let opts = Pipedrive.UpdatePerson.constructFromObject({
// Properties that you want to update
});
apiInstance.updatePerson(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the person | |
UpdatePerson | UpdatePerson | [optional] |
- Content-Type: application/json
- Accept: application/json