All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addLeadLabel | POST /leadLabels | Add a lead label |
deleteLeadLabel | DELETE /leadLabels/{id} | Delete a lead label |
getLeadLabels | GET /leadLabels | Get all lead labels |
updateLeadLabel | PATCH /leadLabels/{id} | Update a lead label |
UpsertLeadLabelResponse addLeadLabel(opts)
Add a lead label
Creates a lead label.
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.LeadLabelsApi(apiClient);
let opts = Pipedrive.AddLeadLabelRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addLeadLabel(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
AddLeadLabelRequest | AddLeadLabelRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
DeleteLeadIdResponse deleteLeadLabel(id)
Delete a lead label
Deletes a specific lead label.
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.LeadLabelsApi(apiClient);
let id = "id_example"; // String | The ID of the lead label
apiInstance.deleteLeadLabel(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | The ID of the lead label |
- Content-Type: Not defined
- Accept: application/json
GetLeadLabelsResponse getLeadLabels()
Get all lead labels
Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned.
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.LeadLabelsApi(apiClient);
apiInstance.getLeadLabels().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
UpsertLeadLabelResponse updateLeadLabel(id, opts)
Update a lead label
Updates one or more properties of a lead label. Only properties included in the request will be updated.
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.LeadLabelsApi(apiClient);
let id = "id_example"; // String | The ID of the lead label
let opts = Pipedrive.UpdateLeadLabelRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.updateLeadLabel(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | The ID of the lead label | |
UpdateLeadLabelRequest | UpdateLeadLabelRequest | [optional] |
- Content-Type: application/json
- Accept: application/json