All URIs are relative to https://api.pipedrive.com/v1.
| Method | HTTP request | Description |
|---|---|---|
| addUser() | POST /users | Add a new user |
| findUsersByName() | GET /users/find | Find users by name |
| getCurrentUser() | GET /users/me | Get current user data |
| getUser() | GET /users/{id} | Get one 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 |
addUser($add_user_request): \Pipedrive\versions\v1\Model\UserAdd a new user
Adds a new user to the company, returns the ID upon success.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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_user_request = new \Pipedrive\versions\v1\Model\AddUserRequest(); // \Pipedrive\versions\v1\Model\AddUserRequest
try {
$result = $apiInstance->addUser($add_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->addUser: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| add_user_request | \Pipedrive\versions\v1\Model\AddUserRequest | [optional] |
\Pipedrive\versions\v1\Model\User
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
findUsersByName($term, $search_by_email): \Pipedrive\versions\v1\Model\UsersFind users by name
Finds users by their name.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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
);
$term = 'term_example'; // string | The search term to look for
$search_by_email = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBooleanDefault0(); // \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | When enabled, the term will only be matched against email addresses of users. Default: `false`.
try {
$result = $apiInstance->findUsersByName($term, $search_by_email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->findUsersByName: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| term | string | The search term to look for | |
| search_by_email | \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | When enabled, the term will only be matched against email addresses of users. Default: `false`. | [optional] |
\Pipedrive\versions\v1\Model\Users
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getCurrentUser(): \Pipedrive\versions\v1\Model\UserMeGet 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/number format' in the Pipedrive account settings, not the chosen language.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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->getCurrentUser();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getCurrentUser: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Pipedrive\versions\v1\Model\UserMe
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUser($id): \Pipedrive\versions\v1\Model\UserGet one user
Returns data about a specific user within the company.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
try {
$result = $apiInstance->getUser($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user |
\Pipedrive\versions\v1\Model\User
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserFollowers($id): \Pipedrive\versions\v1\Model\UserIDsList followers of a user
Lists the followers of a specific user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
try {
$result = $apiInstance->getUserFollowers($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserFollowers: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user |
\Pipedrive\versions\v1\Model\UserIDs
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserPermissions($id): \Pipedrive\versions\v1\Model\UserPermissionsList user permissions
Lists aggregated permissions over all assigned permission sets for a user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
try {
$result = $apiInstance->getUserPermissions($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserPermissions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user |
\Pipedrive\versions\v1\Model\UserPermissions
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserRoleAssignments($id, $start, $limit): \Pipedrive\versions\v1\Model\GetRoleAssignmentsList role assignments
Lists role assignments for a user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
try {
$result = $apiInstance->getUserRoleAssignments($id, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserRoleAssignments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user | |
| start | int | Pagination start | [optional] [default to 0] |
| limit | int | Items shown per page | [optional] |
\Pipedrive\versions\v1\Model\GetRoleAssignments
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserRoleSettings($id): \Pipedrive\versions\v1\Model\GetRoleSettingsList user role settings
Lists the settings of user's assigned role.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
try {
$result = $apiInstance->getUserRoleSettings($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserRoleSettings: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user |
\Pipedrive\versions\v1\Model\GetRoleSettings
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUsers(): \Pipedrive\versions\v1\Model\UsersGet all users
Returns data about all users within the company.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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->getUsers();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Pipedrive\versions\v1\Model\Users
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUser($id, $update_user_request): \Pipedrive\versions\v1\Model\UserUpdate user details
Updates the properties of a user. Currently, only active_flag can be updated.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('x-api-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v1\Api\UsersApi(
// 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 user
$update_user_request = new \Pipedrive\versions\v1\Model\UpdateUserRequest(); // \Pipedrive\versions\v1\Model\UpdateUserRequest
try {
$result = $apiInstance->updateUser($id, $update_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the user | |
| update_user_request | \Pipedrive\versions\v1\Model\UpdateUserRequest | [optional] |
\Pipedrive\versions\v1\Model\User
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]