All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addTeam | POST /teams | Add a new team |
addTeamUser | POST /teams/{id}/users | Add users to a team |
deleteTeamUser | DELETE /teams/{id}/users | Delete users from a team |
getTeam | GET /teams/{id} | Get a single team |
getTeamUsers | GET /teams/{id}/users | Get all users in a team |
getTeams | GET /teams | Get all teams |
getUserTeams | GET /teams/user/{id} | Get all teams of a user |
updateTeam | PUT /teams/{id} | Update a team |
Teams addTeam(opts)
Add a new team
Adds a new team to the company and returns the created object
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.TeamsApi();
let opts = {
'createTeam': new Pipedrive.CreateTeam() // CreateTeam |
};
apiInstance.addTeam(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createTeam | CreateTeam | [optional] |
- Content-Type: application/json
- Accept: application/json
UserIDs addTeamUser(id, opts)
Add users to a team
Adds users to an existing team
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.TeamsApi();
let id = 56; // Number | ID of the team
let opts = {
'addTeamUserRequest': new Pipedrive.AddTeamUserRequest() // AddTeamUserRequest |
};
apiInstance.addTeamUser(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 team | |
addTeamUserRequest | AddTeamUserRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
UserIDs deleteTeamUser(id, opts)
Delete users from a team
Deletes users from an existing team
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.TeamsApi();
let id = 56; // Number | ID of the team
let opts = {
'deleteTeamUserRequest': new Pipedrive.DeleteTeamUserRequest() // DeleteTeamUserRequest |
};
apiInstance.deleteTeamUser(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 team | |
deleteTeamUserRequest | DeleteTeamUserRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Teams getTeam(id, opts)
Get a single team
Returns data about a specific team
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.TeamsApi();
let id = 56; // Number | ID of the team
let opts = {
'skipUsers': new Pipedrive.NumberBooleanDefault0() // NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
};
apiInstance.getTeam(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 team | |
skipUsers | NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept: application/json
UserIDs getTeamUsers(id)
Get all users in a team
Returns list of all user IDs within a team
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.TeamsApi();
let id = 56; // Number | ID of the team
apiInstance.getTeamUsers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the team |
- Content-Type: Not defined
- Accept: application/json
Teams getTeams(opts)
Get all teams
Returns data about teams 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.TeamsApi();
let opts = {
'orderBy': "'id'", // String | Field name to sort returned teams by
'skipUsers': new Pipedrive.NumberBooleanDefault0() // NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
};
apiInstance.getTeams(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
orderBy | String | Field name to sort returned teams by | [optional] [default to 'id'] |
skipUsers | NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept: application/json
Teams getUserTeams(id, opts)
Get all teams of a user
Returns data about all teams which have specified user as a member
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.TeamsApi();
let id = 56; // Number | ID of the user
let opts = {
'orderBy': "'id'", // String | Field name to sort returned teams by
'skipUsers': new Pipedrive.NumberBooleanDefault0() // NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users
};
apiInstance.getUserTeams(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 | |
orderBy | String | Field name to sort returned teams by | [optional] [default to 'id'] |
skipUsers | NumberBooleanDefault0 | When enabled, the teams will not include IDs of member users | [optional] |
- Content-Type: Not defined
- Accept: application/json
Teams updateTeam(id, opts)
Update a team
Updates an existing team and returns the updated object
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.TeamsApi();
let id = 56; // Number | ID of the team
let opts = {
'updateTeam': new Pipedrive.UpdateTeam() // UpdateTeam |
};
apiInstance.updateTeam(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 team | |
updateTeam | UpdateTeam | [optional] |
- Content-Type: application/json
- Accept: application/json