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 |
addLeadLabel($add_lead_label_request): \Pipedrive\Model\AddOrUpdateLeadLabelResponse200
Add a lead label
Creates a lead label.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\Api\LeadLabelsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$add_lead_label_request = new \Pipedrive\Model\AddLeadLabelRequest(); // \Pipedrive\Model\AddLeadLabelRequest
try {
$result = $apiInstance->addLeadLabel($add_lead_label_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadLabelsApi->addLeadLabel: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
add_lead_label_request | \Pipedrive\Model\AddLeadLabelRequest | [optional] |
\Pipedrive\Model\AddOrUpdateLeadLabelResponse200
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLeadLabel($id): \Pipedrive\Model\LeadIdResponse200
Delete a lead label
Deletes a specific lead label.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\Api\LeadLabelsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | The ID of the lead label
try {
$result = $apiInstance->deleteLeadLabel($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadLabelsApi->deleteLeadLabel: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the lead label |
\Pipedrive\Model\LeadIdResponse200
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLeadLabels(): \Pipedrive\Model\GetLeadLabelsResponse200
Get all lead labels
Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\Api\LeadLabelsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getLeadLabels();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadLabelsApi->getLeadLabels: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\Pipedrive\Model\GetLeadLabelsResponse200
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateLeadLabel($id, $update_lead_label_request): \Pipedrive\Model\AddOrUpdateLeadLabelResponse200
Update a lead label
Updates one or more properties of a lead label. Only properties included in the request will be updated.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\Api\LeadLabelsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | The ID of the lead label
$update_lead_label_request = new \Pipedrive\Model\UpdateLeadLabelRequest(); // \Pipedrive\Model\UpdateLeadLabelRequest
try {
$result = $apiInstance->updateLeadLabel($id, $update_lead_label_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadLabelsApi->updateLeadLabel: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the lead label | |
update_lead_label_request | \Pipedrive\Model\UpdateLeadLabelRequest | [optional] |
\Pipedrive\Model\AddOrUpdateLeadLabelResponse200
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]