All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addUser | POST /users | Add a new user |
addUserBlacklistedEmail | POST /users/{id}/blacklistedEmails | Add blacklisted email address for a user |
addUserRoleAssignment | POST /users/{id}/roleAssignments | Add role assignment |
deleteUserRoleAssignment | DELETE /users/{id}/roleAssignments | Delete a role assignment |
findUsersByName | GET /users/find | Find users by name |
getCurrentUser | GET /users/me | Get current user data |
getUser | GET /users/{id} | Get one user |
getUserBlacklistedEmails | GET /users/{id}/blacklistedEmails | List blacklisted email addresses of a user |
getUserFollowers | GET /users/{id}/followers | List followers of a user |
getUserPermissions | GET /users/{id}/permissions | List user permissions |
getUserRoleAssignments | GET /users/{id}/roleAssignments | List role assignments |
getUserRoleSettings | GET /users/{id}/roleSettings | List user role settings |
getUsers | GET /users | Get all users |
updateUser | PUT /users/{id} | Update user details |
User addUser(name, email, activeFlag)
Add a new user
Adds a new user to the company, returns the ID upon success.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let name = "name_example"; // String | Name of the user
let email = "email_example"; // String | Email of the user
let activeFlag = true; // Boolean | Whether the user is active or not. false = Not activated, true = Activated
apiInstance.addUser(name, email, activeFlag).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of the user | |
String | Email of the user | ||
activeFlag | Boolean | Whether the user is active or not. false = Not activated, true = Activated | [default to true] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Object addUserBlacklistedEmail(id, address)
Add blacklisted email address for a user
Add blacklisted email address for a specific user.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
let address = "address_example"; // String | Email address to blacklist (can contain \\\\\\\\* for wildcards, e.g. \\\\\\\\*@example.com, or john\\\\\\\\*@ex\\\\\\\\*.com)
apiInstance.addUserBlacklistedEmail(id, address).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user | |
address | String | Email address to blacklist (can contain \\\\* for wildcards, e.g. \\\\@example.com, or john\\\\@ex\\\\*.com) |
Object
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
PostRoleAssignment addUserRoleAssignment(id, roleId)
Add role assignment
Add role assignment for a user
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
let roleId = 56; // Number | ID of the role
apiInstance.addUserRoleAssignment(id, roleId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user | |
roleId | Number | ID of the role |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
DeleteRoleAssignment deleteUserRoleAssignment(id, roleId)
Delete a role assignment
Delete a role assignment for a user
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
let roleId = 56; // Number | ID of the role
apiInstance.deleteUserRoleAssignment(id, roleId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user | |
roleId | Number | ID of the role |
- Content-Type: Not defined
- Accept: application/json
Users findUsersByName(term, opts)
Find users by name
Finds users by their name.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let term = "term_example"; // String | Search term to look for
let opts = {
'searchByEmail': new Pipedrive.NumberBooleanDefault0() // NumberBooleanDefault0 | When enabled, term will only be matched against email addresses of users. Default: false
};
apiInstance.findUsersByName(term, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
term | String | Search term to look for | |
searchByEmail | NumberBooleanDefault0 | When enabled, term will only be matched against email addresses of users. Default: false | [optional] |
- Content-Type: Not defined
- Accept: application/json
UserMe getCurrentUser()
Get current user data
Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the 'locale' property means 'Date and number format' in the Pipedrive settings, not the chosen language.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
apiInstance.getCurrentUser().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
User getUser(id)
Get one user
Returns data about a specific user within the company
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
apiInstance.getUser(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user |
- Content-Type: Not defined
- Accept: application/json
Object getUserBlacklistedEmails(id)
List blacklisted email addresses of a user
Lists blacklisted email addresses of a specific user. Blacklisted emails are such that will not get synced in to Pipedrive when using the built-in Mailbox.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
apiInstance.getUserBlacklistedEmails(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user |
Object
- Content-Type: Not defined
- Accept: application/json
UserIDs getUserFollowers(id)
List followers of a user
Lists followers of a specific user.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
apiInstance.getUserFollowers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user |
- Content-Type: Not defined
- Accept: application/json
UserPermissions getUserPermissions(id)
List user permissions
List aggregated permissions over all assigned permission sets for a user
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
apiInstance.getUserPermissions(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user |
- Content-Type: Not defined
- Accept: application/json
GetRoleAssignments getUserRoleAssignments(id, opts)
List role assignments
List role assignments for a user
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getUserRoleAssignments(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
GetRoleSettings getUserRoleSettings(id)
List user role settings
List settings of user's assigned role
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
apiInstance.getUserRoleSettings(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user |
- Content-Type: Not defined
- Accept: application/json
Users getUsers()
Get all users
Returns data about all users within the company
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
apiInstance.getUsers().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
User updateUser(id, activeFlag)
Update user details
Updates the properties of a user. Currently, only active_flag can be updated.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.UsersApi();
let id = 56; // Number | ID of the user
let activeFlag = true; // Boolean | Whether the user is active or not. false = Not activated, true = Activated
apiInstance.updateUser(id, activeFlag).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the user | |
activeFlag | Boolean | Whether the user is active or not. false = Not activated, true = Activated | [default to true] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json