All URIs are relative to https://api.pipedrive.com/v1.
Method | HTTP request | Description |
---|---|---|
addOrUpdateRoleSetting() | POST /roles/{id}/settings | Add or update role setting |
addRole() | POST /roles | Add a role |
addRoleAssignment() | POST /roles/{id}/assignments | Add role assignment |
deleteRole() | DELETE /roles/{id} | Delete a role |
deleteRoleAssignment() | DELETE /roles/{id}/assignments | Delete a role assignment |
getRole() | GET /roles/{id} | Get one role |
getRoleAssignments() | GET /roles/{id}/assignments | List role assignments |
getRolePipelines() | GET /roles/{id}/pipelines | List pipeline visibility for a role |
getRoleSettings() | GET /roles/{id}/settings | List role settings |
getRoles() | GET /roles | Get all roles |
updateRole() | PUT /roles/{id} | Update role details |
updateRolePipelines() | PUT /roles/{id}/pipelines | Update pipeline visibility for a role |
addOrUpdateRoleSetting($id, $add_or_update_role_setting_request): \Pipedrive\Model\PostRoleSettings
Add or update role setting
Adds or updates the visibility setting for a role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$add_or_update_role_setting_request = new \Pipedrive\Model\AddOrUpdateRoleSettingRequest(); // \Pipedrive\Model\AddOrUpdateRoleSettingRequest
try {
$result = $apiInstance->addOrUpdateRoleSetting($id, $add_or_update_role_setting_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->addOrUpdateRoleSetting: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
add_or_update_role_setting_request | \Pipedrive\Model\AddOrUpdateRoleSettingRequest | [optional] |
\Pipedrive\Model\PostRoleSettings
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addRole($add_role): \Pipedrive\Model\PostRoles
Add a role
Adds a new role.
<?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\RolesApi(
// 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_role = new \Pipedrive\Model\AddRole(); // \Pipedrive\Model\AddRole
try {
$result = $apiInstance->addRole($add_role);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->addRole: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
add_role | \Pipedrive\Model\AddRole | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addRoleAssignment($id, $add_role_assignment_request): \Pipedrive\Model\PostRoleAssignment
Add role assignment
Assigns a user to a role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$add_role_assignment_request = new \Pipedrive\Model\AddRoleAssignmentRequest(); // \Pipedrive\Model\AddRoleAssignmentRequest
try {
$result = $apiInstance->addRoleAssignment($id, $add_role_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->addRoleAssignment: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
add_role_assignment_request | \Pipedrive\Model\AddRoleAssignmentRequest | [optional] |
\Pipedrive\Model\PostRoleAssignment
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteRole($id): \Pipedrive\Model\DeleteRole
Delete a role
Marks a role as deleted.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
try {
$result = $apiInstance->deleteRole($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->deleteRole: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteRoleAssignment($id, $delete_role_assignment_request): \Pipedrive\Model\DeleteRoleAssignment
Delete a role assignment
Removes the assigned user from a role and adds to the default role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$delete_role_assignment_request = new \Pipedrive\Model\DeleteRoleAssignmentRequest(); // \Pipedrive\Model\DeleteRoleAssignmentRequest
try {
$result = $apiInstance->deleteRoleAssignment($id, $delete_role_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->deleteRoleAssignment: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
delete_role_assignment_request | \Pipedrive\Model\DeleteRoleAssignmentRequest | [optional] |
\Pipedrive\Model\DeleteRoleAssignment
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getRole($id): \Pipedrive\Model\GetRole
Get one role
Returns the details of a specific role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
try {
$result = $apiInstance->getRole($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->getRole: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getRoleAssignments($id, $start, $limit): \Pipedrive\Model\GetRoleAssignments
List role assignments
Returns all users assigned to a role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
try {
$result = $apiInstance->getRoleAssignments($id, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->getRoleAssignments: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
\Pipedrive\Model\GetRoleAssignments
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getRolePipelines($id, $visible): \Pipedrive\Model\GetRolePipelines
List pipeline visibility for a role
Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the <a href="https://support.pipedrive.com/en/article/visibility-groups\" target="_blank" rel="noopener noreferrer">Visibility groups article.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$visible = true; // bool | Whether to return the visible or hidden pipelines for the role
try {
$result = $apiInstance->getRolePipelines($id, $visible);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->getRolePipelines: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
visible | bool | Whether to return the visible or hidden pipelines for the role | [optional] [default to true] |
\Pipedrive\Model\GetRolePipelines
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getRoleSettings($id): \Pipedrive\Model\GetRoleSettings
List role settings
Returns the visibility settings of a specific role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
try {
$result = $apiInstance->getRoleSettings($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->getRoleSettings: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role |
\Pipedrive\Model\GetRoleSettings
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getRoles($start, $limit): \Pipedrive\Model\GetRoles
Get all roles
Returns all the roles within the company.
<?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\RolesApi(
// 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
);
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
try {
$result = $apiInstance->getRoles($start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->getRoles: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateRole($id, $base_role): \Pipedrive\Model\PutRole
Update role details
Updates the parent role and/or the name of a specific role.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$base_role = new \Pipedrive\Model\BaseRole(); // \Pipedrive\Model\BaseRole
try {
$result = $apiInstance->updateRole($id, $base_role);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->updateRole: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
base_role | \Pipedrive\Model\BaseRole | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateRolePipelines($id, $put_role_pipelines_body): \Pipedrive\Model\GetRolePipelines
Update pipeline visibility for a role
Updates the specified pipelines to be visible and/or hidden for a specific role. For more information on pipeline visibility, please refer to the <a href="https://support.pipedrive.com/en/article/visibility-groups\" target="_blank" rel="noopener noreferrer">Visibility groups article.
<?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\RolesApi(
// 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 = 56; // int | The ID of the role
$put_role_pipelines_body = new \Pipedrive\Model\PutRolePipelinesBody(); // \Pipedrive\Model\PutRolePipelinesBody
try {
$result = $apiInstance->updateRolePipelines($id, $put_role_pipelines_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->updateRolePipelines: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the role | |
put_role_pipelines_body | \Pipedrive\Model\PutRolePipelinesBody | [optional] |
\Pipedrive\Model\GetRolePipelines
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]