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 |
PostRoleSettings addOrUpdateRoleSetting(id, opts)
Add or update role setting
Adds or updates the visibility setting for a role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
let opts = Pipedrive.AddOrUpdateRoleSettingRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addOrUpdateRoleSetting(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 role | |
AddOrUpdateRoleSettingRequest | AddOrUpdateRoleSettingRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
PostRoles addRole(opts)
Add a role
Adds a new role.
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.RolesApi(apiClient);
let opts = Pipedrive.AddRole.constructFromObject({
// Properties that you want to update
});
apiInstance.addRole(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
AddRole | AddRole | [optional] |
- Content-Type: application/json
- Accept: application/json
PostRoleAssignment addRoleAssignment(id, opts)
Add role assignment
Assigns a user to a role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
let opts = Pipedrive.AddRoleAssignmentRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addRoleAssignment(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 role | |
AddRoleAssignmentRequest | AddRoleAssignmentRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
DeleteRole deleteRole(id)
Delete a role
Marks a role as 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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
apiInstance.deleteRole(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 role |
- Content-Type: Not defined
- Accept: application/json
DeleteRoleAssignment deleteRoleAssignment(id, opts)
Delete a role assignment
Removes the assigned user from a role and adds to the default role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
let opts = Pipedrive.DeleteRoleAssignmentRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.deleteRoleAssignment(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 role | |
DeleteRoleAssignmentRequest | DeleteRoleAssignmentRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
GetRole getRole(id)
Get one role
Returns the details of a specific role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
apiInstance.getRole(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 role |
- Content-Type: Not defined
- Accept: application/json
GetRoleAssignments getRoleAssignments(id, opts)
List role assignments
Returns all users assigned to a role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
// 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.getRoleAssignments(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 role | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
GetRolePipelines getRolePipelines(id, opts)
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</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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'visible': true // Boolean | Whether to return the visible or hidden pipelines for the role
};
apiInstance.getRolePipelines(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 role | |
visible | Boolean | Whether to return the visible or hidden pipelines for the role | [optional] [default to true] |
- Content-Type: Not defined
- Accept: application/json
GetRoleSettings getRoleSettings(id)
List role settings
Returns the visibility settings of a specific role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
apiInstance.getRoleSettings(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 role |
- Content-Type: Not defined
- Accept: application/json
GetRoles getRoles(opts)
Get all roles
Returns all the roles within the company.
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.RolesApi(apiClient);
// 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.getRoles(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
PutRole updateRole(id, opts)
Update role details
Updates the parent role and/or the name of a specific role.
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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
let opts = Pipedrive.BaseRole.constructFromObject({
// Properties that you want to update
});
apiInstance.updateRole(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 role | |
BaseRole | BaseRole | [optional] |
- Content-Type: application/json
- Accept: application/json
GetRolePipelines updateRolePipelines(id, opts)
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</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.RolesApi(apiClient);
let id = 56; // Number | The ID of the role
let opts = Pipedrive.PutRolePipelinesBody.constructFromObject({
// Properties that you want to update
});
apiInstance.updateRolePipelines(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 role | |
PutRolePipelinesBody | PutRolePipelinesBody | [optional] |
- Content-Type: application/json
- Accept: application/json