All URIs are relative to https://api.pipedrive.com/v1.
Method | HTTP request | Description |
---|---|---|
addTeam() | POST /legacyTeams | Add a new team |
addTeamUser() | POST /legacyTeams/{id}/users | Add users to a team |
deleteTeamUser() | DELETE /legacyTeams/{id}/users | Delete users from a team |
getTeam() | GET /legacyTeams/{id} | Get a single team |
getTeamUsers() | GET /legacyTeams/{id}/users | Get all users in a team |
getTeams() | GET /legacyTeams | Get all teams |
getUserTeams() | GET /legacyTeams/user/{id} | Get all teams of a user |
updateTeam() | PUT /legacyTeams/{id} | Update a team |
addTeam($create_team): \Pipedrive\Model\Team
Add a new team
Adds a new team to the company and returns the created object.
<?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\LegacyTeamsApi(
// 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
);
$create_team = new \Pipedrive\Model\CreateTeam(); // \Pipedrive\Model\CreateTeam
try {
$result = $apiInstance->addTeam($create_team);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->addTeam: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
create_team | \Pipedrive\Model\CreateTeam | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addTeamUser($id, $add_team_user_request): \Pipedrive\Model\UserIDs
Add users to a team
Adds users to an existing team.
<?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\LegacyTeamsApi(
// 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 team
$add_team_user_request = new \Pipedrive\Model\AddTeamUserRequest(); // \Pipedrive\Model\AddTeamUserRequest
try {
$result = $apiInstance->addTeamUser($id, $add_team_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->addTeamUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the team | |
add_team_user_request | \Pipedrive\Model\AddTeamUserRequest | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteTeamUser($id, $delete_team_user_request): \Pipedrive\Model\UserIDs
Delete users from a team
Deletes users from an existing team.
<?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\LegacyTeamsApi(
// 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 team
$delete_team_user_request = new \Pipedrive\Model\DeleteTeamUserRequest(); // \Pipedrive\Model\DeleteTeamUserRequest
try {
$result = $apiInstance->deleteTeamUser($id, $delete_team_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->deleteTeamUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the team | |
delete_team_user_request | \Pipedrive\Model\DeleteTeamUserRequest | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getTeam($id, $skip_users): \Pipedrive\Model\Team
Get a single team
Returns data about a specific team.
<?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\LegacyTeamsApi(
// 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 team
$skip_users = new \Pipedrive\Model\\Pipedrive\Model\NumberBooleanDefault0(); // \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
try {
$result = $apiInstance->getTeam($id, $skip_users);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->getTeam: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the team | |
skip_users | \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getTeamUsers($id): \Pipedrive\Model\UserIDs
Get all users in a team
Returns a list of all user IDs within a team.
<?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\LegacyTeamsApi(
// 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 team
try {
$result = $apiInstance->getTeamUsers($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->getTeamUsers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the team |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getTeams($order_by, $skip_users): \Pipedrive\Model\Teams
Get all teams
Returns data about teams 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\LegacyTeamsApi(
// 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
);
$order_by = 'id'; // string | The field name to sort returned teams by
$skip_users = new \Pipedrive\Model\\Pipedrive\Model\NumberBooleanDefault0(); // \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
try {
$result = $apiInstance->getTeams($order_by, $skip_users);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->getTeams: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
order_by | string | The field name to sort returned teams by | [optional] [default to 'id'] |
skip_users | \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserTeams($id, $order_by, $skip_users): \Pipedrive\Model\Teams
Get all teams of a user
Returns data about all teams which have the specified user as a member.
<?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\LegacyTeamsApi(
// 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
$order_by = 'id'; // string | The field name to sort returned teams by
$skip_users = new \Pipedrive\Model\\Pipedrive\Model\NumberBooleanDefault0(); // \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
try {
$result = $apiInstance->getUserTeams($id, $order_by, $skip_users);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->getUserTeams: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the user | |
order_by | string | The field name to sort returned teams by | [optional] [default to 'id'] |
skip_users | \Pipedrive\Model\NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateTeam($id, $update_team): \Pipedrive\Model\Team
Update a team
Updates an existing team and returns the updated object.
<?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\LegacyTeamsApi(
// 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 team
$update_team = new \Pipedrive\Model\UpdateTeam(); // \Pipedrive\Model\UpdateTeam
try {
$result = $apiInstance->updateTeam($id, $update_team);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LegacyTeamsApi->updateTeam: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the team | |
update_team | \Pipedrive\Model\UpdateTeam | [optional] |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]