22.6.1 • Published 2 days ago

pipedrive v22.6.1

Weekly downloads
10,681
License
MIT
Repository
github
Last release
2 days ago

Pipedrive client for NodeJS based apps

Pipedrive is a sales pipeline software that gets you organized. It's a powerful sales CRM with effortless sales pipeline management. See www.pipedrive.com for details.

This is the official Pipedrive API wrapper-client for NodeJS based apps, distributed by Pipedrive Inc freely under the MIT licence. It provides convenient access to the Pipedrive API, allowing you to operate with objects such as Deals, Persons, Organizations, Products and much more.

Installation

npm install pipedrive

⚠️ With the beta version of the SDK, we have moved to an open-source SDK generator called OpenAPI Generator. This enables us to better respond to any issues you might have with the SDK.

Please use the issues page for reporting bugs or leaving feedback. Note that most of the code is automatically generated.

Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your pipedrive from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

API Reference

The Pipedrive RESTful API Reference can be found at https://developers.pipedrive.com/docs/api/v1

License

This Pipedrive API client is distributed under the MIT license.

How to use

With a pre-set API token

const express = require('express');
const app = express();
const lib = require('pipedrive');

const PORT = 1800;

const defaultClient = lib.ApiClient.instance;

// Configure API key authorization: apiToken
let apiToken = defaultClient.authentications.api_key;
apiToken.apiKey = 'YOUR_API_TOKEN_HERE';

// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix.api_token = 'Token';

app.listen(PORT, () => {
    console.log(`Listening on port ${PORT}`);
});

app.get('/', async (req, res) => {
    const api = new lib.DealsApi();
    const deals = await api.dealsGet();

    res.send(deals);
});

With OAuth 2

If you would like to use OAuth access token for making API calls then make sure the API key, that was described in the previous section, is not set or is set to an empty string. If both API token and OAuth access token are set, then the API token takes precedence.

In order to setup authentication in the API client, you need the following information.

ParameterDescription
clientIdOAuth 2 Client ID
clientSecretOAuth 2 Client Secret
redirectUriOAuth 2 Redirection endpoint or Callback Uri

API client can be initialized as following:

const lib = require('pipedrive');

const apiClient = lib.ApiClient.instance;

// Configuration parameters and credentials
let oauth2 = apiClient.authentications.oauth2;
oauth2.clientId = 'clientId'; // OAuth 2 Client ID
oauth2.clientSecret = 'clientSecret'; // OAuth 2 Client Secret
oauth2.redirectUri = 'redirectUri'; // OAuth 2 Redirection endpoint or Callback Uri

You must now authorize the client.

Authorizing your client

Your application must obtain user authorization before it can execute an endpoint call. The SDK uses OAuth 2.0 authorization to obtain a user's consent to perform an API request on user's behalf.

1. Obtaining user consent

To obtain user's consent, you must redirect the user to the authorization page. The buildAuthorizationUrl() method creates the URL to the authorization page.

const authUrl = apiClient.buildAuthorizationUrl();
// open up the authUrl in the browser

2. Handle the OAuth server response

Once the user responds to the consent request, the OAuth 2.0 server responds to your application's access request by using the URL specified in the request.

If the user approves the request, the authorization code will be sent as the code query string:

https://example.com/oauth/callback?code=XXXXXXXXXXXXXXXXXXXXXXXXX

If the user does not approve the request, the response contains an error query string:

https://example.com/oauth/callback?error=access_denied

3. Authorize the client using the code

After the server receives the code, it can exchange this for an access token. The access token is an object containing information for authorizing the client and refreshing the token itself. In the API client all the access token fields are held separately in the authentications.oauth2 object. Additionally access token expiration time as an authentications.oauth2.expiresAt field is calculated. It is measured in the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.

const tokenPromise = apiClient.authorize(code);

The Node.js SDK supports only promises. So, the authorize call returns a promise.

Refreshing token

Access tokens may expire after sometime. To extend its lifetime, you must refresh the token.

const refreshPromise = apiClient.refreshToken();
refreshPromise.then(() => {
    // token has been refreshed
} , (exception) => {
    // error occurred, exception will be of type src/exceptions/OAuthProviderException
});

If the access token expires, the SDK will attempt to automatically refresh it before the next endpoint call which requires authentication.

Storing an access token for reuse

It is recommended that you store the access token for reuse.

This code snippet stores the access token in a session for an express application. It uses the cookie-parser and cookie-session npm packages for storing the access token.

const express = require('express');
const cookieParser = require('cookie-parser');
const cookieSession = require('cookie-session');

const app = express();
app.use(cookieParser());
app.use(cookieSession({
    name: 'session',
    keys: ['key1']
}));

const lib = require('pipedrive');
...
// store access token in the session
// note that this is only the access token field value not the whole token object
req.session.accessToken = apiClient.authentications.oauth2.accessToken;

However, since the SDK will attempt to automatically refresh the access token when it expires, it is recommended that you register a token update callback to detect any change to the access token.

apiClient.authentications.oauth2.tokenUpdateCallback = function(token) {
    // getting the updated token
    // here the token is an object, you can store the whole object or extract fields into separate values
    req.session.token = token;
}

The token update callback will be fired upon authorization as well as token refresh.

To authorize a client from a stored access token, just set the access token in api client oauth2 authentication object along with the other configuration parameters before making endpoint calls:

NB! This code only supports one client and should not be used as production code. Please store a separate access token for each client.

const express = require('express');
const cookieParser = require('cookie-parser');
const cookieSession = require('cookie-session');

const app = express();
app.use(cookieParser());
app.use(cookieSession({
    name: 'session',
    keys: ['key1']
}));

const lib = require('pipedrive');

app.get('/', (req, res) => {
    apiClient.authentications.oauth2.accessToken = req.session.accessToken; // the access token stored in the session
});

Complete example

This example demonstrates an express application (which uses cookie-parser and cookie-session) for handling session persistence.

In this example, there are 2 endpoints. The base endpoint '/' first checks if the token is stored in the session. If it is, API endpoints can be called using the corresponding SDK controllers.

However, if the token is not set in the session, then authorization URL is built and opened up. The response comes back at the '/callback' endpoint, which uses the code to authorize the client and store the token in the session. It then redirects back to the base endpoint for calling endpoints from the SDK.

const express = require('express');
const app = express();
const cookieParser = require('cookie-parser');
const cookieSession = require('cookie-session');

app.use(cookieParser());
app.use(cookieSession({
    name: 'session',
    keys: ['key1']
}));
const PORT = 1800;

const lib = require('pipedrive');

const apiClient = lib.ApiClient.instance;

let oauth2 = apiClient.authentications.oauth2;
oauth2.clientId = 'clientId'; // OAuth 2 Client ID
oauth2.clientSecret = 'clientSecret'; // OAuth 2 Client Secret
oauth2.redirectUri = 'http://localhost:1800/callback'; // OAuth 2 Redirection endpoint or Callback Uri

app.listen(PORT, () => {
    console.log(`Listening on port ${PORT}`);
});

app.get('/', async (req, res) => {
    if (req.session.accessToken !== null && req.session.accessToken !== undefined) {
        // token is already set in the session
        // now make API calls as required
        // client will automatically refresh the token when it expires and call the token update callback
        const api = new lib.DealsApi();
        const deals = await api.dealsGet();

        res.send(deals);
    } else {
        const authUrl = apiClient.buildAuthorizationUrl();;

        res.redirect(authUrl);
    }
});

app.get('/callback', (req, res) => {
    const authCode = req.query.code;
    const promise = apiClient.authorize(code);

    promise.then(() => {
        req.session.accessToken = apiClient.authentications.oauth2.accessToken;
        res.redirect('/');
    }, (exception) => {
        // error occurred, exception will be of type src/exceptions/OAuthProviderException
    });
});

Documentation for API Endpoints

All URIs are relative to https://api.pipedrive.com/v1

ClassMethodHTTP requestDescription
Pipedrive.ActivitiesApiaddActivityPOST /activitiesAdd an Activity
Pipedrive.ActivitiesApideleteActivitiesDELETE /activitiesDelete multiple Activities in bulk
Pipedrive.ActivitiesApideleteActivityDELETE /activities/{id}Delete an Activity
Pipedrive.ActivitiesApigetActivitiesGET /activitiesGet all Activities assigned to a particular User
Pipedrive.ActivitiesApigetActivityGET /activities/{id}Get details of an Activity
Pipedrive.ActivitiesApiupdateActivityPUT /activities/{id}Edit an Activity
Pipedrive.ActivityFieldsApigetActivityFieldsGET /activityFieldsGet all activity fields
Pipedrive.ActivityTypesApiaddActivityTypePOST /activityTypesAdd new ActivityType
Pipedrive.ActivityTypesApideleteActivityTypeDELETE /activityTypes/{id}Delete an ActivityType
Pipedrive.ActivityTypesApideleteActivityTypesDELETE /activityTypesDelete multiple ActivityTypes in bulk
Pipedrive.ActivityTypesApigetActivityTypesGET /activityTypesGet all ActivityTypes
Pipedrive.ActivityTypesApiupdateActivityTypePUT /activityTypes/{id}Edit an ActivityType
Pipedrive.CallLogsApiaddCallLogPOST /callLogsAdd a call log
Pipedrive.CallLogsApiaddCallLogAudioFilePOST /callLogs/{id}/recordingsAttach an audio file to the call log
Pipedrive.CallLogsApideleteCallLogDELETE /callLogs/{id}Delete a call log
Pipedrive.CallLogsApigetCallLogGET /callLogs/{id}Get details of a call log
Pipedrive.CallLogsApigetUserCallLogsGET /callLogsGet all call logs assigned to a particular user
Pipedrive.CurrenciesApigetCurrenciesGET /currenciesGet all supported currencies
Pipedrive.DealFieldsApiaddDealFieldPOST /dealFieldsAdd a new deal field
Pipedrive.DealFieldsApideleteDealFieldDELETE /dealFields/{id}Delete a deal field
Pipedrive.DealFieldsApideleteDealFieldsDELETE /dealFieldsDelete multiple deal fields in bulk
Pipedrive.DealFieldsApigetDealFieldGET /dealFields/{id}Get one deal field
Pipedrive.DealFieldsApigetDealFieldsGET /dealFieldsGet all deal fields
Pipedrive.DealFieldsApiupdateDealFieldPUT /dealFields/{id}Update a deal field
Pipedrive.DealsApiaddDealPOST /dealsAdd a deal
Pipedrive.DealsApiaddDealFollowerPOST /deals/{id}/followersAdd a follower to a deal
Pipedrive.DealsApiaddDealParticipantPOST /deals/{id}/participantsAdd a participant to a deal
Pipedrive.DealsApiaddDealProductPOST /deals/{id}/productsAdd a product to the deal, eventually creating a new item called a deal-product
Pipedrive.DealsApideleteDealDELETE /deals/{id}Delete a deal
Pipedrive.DealsApideleteDealFollowerDELETE /deals/{id}/followers/{follower_id}Delete a follower from a deal
Pipedrive.DealsApideleteDealParticipantDELETE /deals/{id}/participants/{deal_participant_id}Delete a participant from a deal
Pipedrive.DealsApideleteDealProductDELETE /deals/{id}/products/{product_attachment_id}Delete an attached product from a deal
Pipedrive.DealsApideleteDealsDELETE /dealsDelete multiple deals in bulk
Pipedrive.DealsApiduplicateDealPOST /deals/{id}/duplicateDuplicate deal
Pipedrive.DealsApigetDealGET /deals/{id}Get details of a deal
Pipedrive.DealsApigetDealActivitiesGET /deals/{id}/activitiesList activities associated with a deal
Pipedrive.DealsApigetDealFilesGET /deals/{id}/filesList files attached to a deal
Pipedrive.DealsApigetDealFollowersGET /deals/{id}/followersList followers of a deal
Pipedrive.DealsApigetDealMailMessagesGET /deals/{id}/mailMessagesList mail messages associated with a deal
Pipedrive.DealsApigetDealParticipantsGET /deals/{id}/participantsList participants of a deal
Pipedrive.DealsApigetDealPersonsGET /deals/{id}/personsList all persons associated with a deal
Pipedrive.DealsApigetDealProductsGET /deals/{id}/productsList products attached to a deal
Pipedrive.DealsApigetDealUpdatesGET /deals/{id}/flowList updates about a deal
Pipedrive.DealsApigetDealUsersGET /deals/{id}/permittedUsersList permitted users
Pipedrive.DealsApigetDealsGET /dealsGet all deals
Pipedrive.DealsApigetDealsByNameGET /deals/findFind deals by name
Pipedrive.DealsApigetDealsSummaryGET /deals/summaryGet deals summary
Pipedrive.DealsApigetDealsTimelineGET /deals/timelineGet deals timeline
Pipedrive.DealsApimergeDealsPUT /deals/{id}/mergeMerge two deals
Pipedrive.DealsApisearchDealsGET /deals/searchSearch deals
Pipedrive.DealsApiupdateDealPUT /deals/{id}Update a deal
Pipedrive.DealsApiupdateDealProductPUT /deals/{id}/products/{product_attachment_id}Update product attachment details of the deal-product (a product already attached to a deal)
Pipedrive.FilesApiaddFilePOST /filesAdd file
Pipedrive.FilesApiaddFileAndLinkItPOST /files/remoteCreate a remote file and link it to an item
Pipedrive.FilesApideleteFileDELETE /files/{id}Delete a file
Pipedrive.FilesApidownloadFileGET /files/{id}/downloadDownload one file
Pipedrive.FilesApigetFileGET /files/{id}Get one file
Pipedrive.FilesApigetFilesGET /filesGet all files
Pipedrive.FilesApilinkFileToItemPOST /files/remoteLinkLink a remote file to an item
Pipedrive.FilesApiupdateFilePUT /files/{id}Update file details
Pipedrive.FiltersApiaddFilterPOST /filtersAdd a new filter
Pipedrive.FiltersApideleteFilterDELETE /filters/{id}Delete a filter
Pipedrive.FiltersApideleteFiltersDELETE /filtersDelete multiple filters in bulk
Pipedrive.FiltersApigetFilterGET /filters/{id}Get one filter
Pipedrive.FiltersApigetFilterHelpersGET /filters/helpersGet all filter helpers
Pipedrive.FiltersApigetFiltersGET /filtersGet all filters
Pipedrive.FiltersApiupdateFilterPUT /filters/{id}Update filter
Pipedrive.GlobalMessagesApideleteGlobalMessageDELETE /globalMessages/{id}Dismiss a global message
Pipedrive.GlobalMessagesApigetGlobalMessagesGET /globalMessagesGet global messages
Pipedrive.GoalsApiaddGoalPOST /goalsAdd a new goal
Pipedrive.GoalsApideleteGoalDELETE /goals/{id}Delete existing goal
Pipedrive.GoalsApigetGoalResultGET /goals/{id}/resultsGet result of a goal
Pipedrive.GoalsApigetGoalsGET /goals/findFind goals
Pipedrive.GoalsApiupdateGoalPUT /goals/{id}Update existing goal
Pipedrive.ItemSearchApisearchItemGET /itemSearchPerform a search from multiple item types
Pipedrive.ItemSearchApisearchItemByFieldGET /itemSearch/fieldPerform a search using a specific field from an item type
Pipedrive.LeadsApiaddLeadPOST /leadsAdd a lead
Pipedrive.LeadsApiaddLeadLabelPOST /leadLabelsAdd a lead label
Pipedrive.LeadsApideleteLeadDELETE /leads/{id}Delete a lead
Pipedrive.LeadsApideleteLeadLabelDELETE /leadLabels/{id}Delete a lead label
Pipedrive.LeadsApigetLeadGET /leads/{id}Get one lead
Pipedrive.LeadsApigetLeadLabelsGET /leadLabelsGet all lead labels
Pipedrive.LeadsApigetLeadSourcesGET /leadSourcesGet all lead sources
Pipedrive.LeadsApigetLeadsGET /leadsGet all leads
Pipedrive.LeadsApiupdateLeadPATCH /leads/{id}Update a lead
Pipedrive.LeadsApiupdateLeadLabelPATCH /leadLabels/{id}Update a lead label
Pipedrive.MailMessagesApigetMailMessageGET /mailbox/mailMessages/{id}Get one mail message
Pipedrive.MailThreadsApideleteMailThreadDELETE /mailbox/mailThreads/{id}Delete mail thread
Pipedrive.MailThreadsApigetMailThreadGET /mailbox/mailThreads/{id}Get one mail thread
Pipedrive.MailThreadsApigetMailThreadMessagesGET /mailbox/mailThreads/{id}/mailMessagesGet all mail messages of mail thread
Pipedrive.MailThreadsApigetMailThreadsGET /mailbox/mailThreadsGet mail threads
Pipedrive.MailThreadsApiupdateMailThreadDetailsPUT /mailbox/mailThreads/{id}Update mail thread details
Pipedrive.NoteFieldsApigetNoteFieldsGET /noteFieldsGet all note fields
Pipedrive.NotesApiaddNotePOST /notesAdd a note
Pipedrive.NotesApideleteNoteDELETE /notes/{id}Delete a note
Pipedrive.NotesApigetNoteGET /notes/{id}Get one note
Pipedrive.NotesApigetNotesGET /notesGet all notes
Pipedrive.NotesApiupdateNotePUT /notes/{id}Update a note
Pipedrive.OrganizationFieldsApiaddOrganizationFieldPOST /organizationFieldsAdd a new organization field
Pipedrive.OrganizationFieldsApideleteOrganizationFieldDELETE /organizationFields/{id}Delete an organization field
Pipedrive.OrganizationFieldsApideleteOrganizationFieldsDELETE /organizationFieldsDelete multiple organization fields in bulk
Pipedrive.OrganizationFieldsApigetOrganizationFieldGET /organizationFields/{id}Get one organization field
Pipedrive.OrganizationFieldsApigetOrganizationFieldsGET /organizationFieldsGet all organization fields
Pipedrive.OrganizationFieldsApiupdateOrganizationFieldPUT /organizationFields/{id}Update an organization field
Pipedrive.OrganizationRelationshipsApiaddOrganizationRelationshipPOST /organizationRelationshipsCreate an organization relationship
Pipedrive.OrganizationRelationshipsApideleteOrganizationRelationshipDELETE /organizationRelationships/{id}Delete an organization relationship
Pipedrive.OrganizationRelationshipsApigetOrganizationRelationShipsGET /organizationRelationshipsGet all relationships for organization
Pipedrive.OrganizationRelationshipsApigetOrganizationRelationshipGET /organizationRelationships/{id}Get one organization relationship
Pipedrive.OrganizationRelationshipsApiupdateOrganizationRelationshipPUT /organizationRelationships/{id}Update an organization relationship
Pipedrive.OrganizationsApiaddOrganizationPOST /organizationsAdd an organization
Pipedrive.OrganizationsApiaddOrganizationFollowerPOST /organizations/{id}/followersAdd a follower to an organization
Pipedrive.OrganizationsApideleteOrganizationDELETE /organizations/{id}Delete an organization
Pipedrive.OrganizationsApideleteOrganizationFollowerDELETE /organizations/{id}/followers/{follower_id}Delete a follower from an organization
Pipedrive.OrganizationsApideleteOrganizationsDELETE /organizationsDelete multiple organizations in bulk
Pipedrive.OrganizationsApigetOrganizationGET /organizations/{id}Get details of an organization
Pipedrive.OrganizationsApigetOrganizationActivitiesGET /organizations/{id}/activitiesList activities associated with an organization
Pipedrive.OrganizationsApigetOrganizationByNameGET /organizations/findFind organizations by name
Pipedrive.OrganizationsApigetOrganizationDealsGET /organizations/{id}/dealsList deals associated with an organization
Pipedrive.OrganizationsApigetOrganizationFilesGET /organizations/{id}/filesList files attached to an organization
Pipedrive.OrganizationsApigetOrganizationFollowersGET /organizations/{id}/followersList followers of an organization
Pipedrive.OrganizationsApigetOrganizationMailMessagesGET /organizations/{id}/mailMessagesList mail messages associated with an organization
Pipedrive.OrganizationsApigetOrganizationPersonsGET /organizations/{id}/personsList persons of an organization
Pipedrive.OrganizationsApigetOrganizationUpdatesGET /organizations/{id}/flowList updates about an organization
Pipedrive.OrganizationsApigetOrganizationUsersGET /organizations/{id}/permittedUsersList permitted users
Pipedrive.OrganizationsApigetOrganizationsGET /organizationsGet all organizations
Pipedrive.OrganizationsApimergeOrganizationsPUT /organizations/{id}/mergeMerge two organizations
Pipedrive.OrganizationsApisearchOrganizationGET /organizations/searchSearch organizations
Pipedrive.OrganizationsApiupdateOrganizationPUT /organizations/{id}Update an organization
Pipedrive.PermissionSetsApigetPermissionSetGET /permissionSets/{id}Get one Permission Set
Pipedrive.PermissionSetsApigetPermissionSetAssignmentsGET /permissionSets/{id}/assignmentsList Permission Set assignments
Pipedrive.PermissionSetsApigetPermissionSetsGET /permissionSetsGet all Permission Sets
Pipedrive.PersonFieldsApiaddPersonFieldPOST /personFieldsAdd a new person field
Pipedrive.PersonFieldsApideletePersonFieldDELETE /personFields/{id}Delete a person field
Pipedrive.PersonFieldsApideletePersonFieldsDELETE /personFieldsDelete multiple person fields in bulk
Pipedrive.PersonFieldsApigetPersonFieldGET /personFields/{id}Get one person field
Pipedrive.PersonFieldsApigetPersonFieldsGET /personFieldsGet all person fields
Pipedrive.PersonFieldsApiupdatePersonFieldPUT /personFields/{id}Update a person field
Pipedrive.PersonsApiaddPersonPOST /personsAdd a person
Pipedrive.PersonsApiaddPersonFollowerPOST /persons/{id}/followersAdd a follower to a person
Pipedrive.PersonsApiaddPersonPicturePOST /persons/{id}/pictureAdd person picture
Pipedrive.PersonsApideletePersonDELETE /persons/{id}Delete a person
Pipedrive.PersonsApideletePersonFollowerDELETE /persons/{id}/followers/{follower_id}Deletes a follower from a person.
Pipedrive.PersonsApideletePersonPictureDELETE /persons/{id}/pictureDelete person picture
Pipedrive.PersonsApideletePersonsDELETE /personsDelete multiple persons in bulk
Pipedrive.PersonsApifindPersonByNameGET /persons/findFind persons by name
Pipedrive.PersonsApigetPersonGET /persons/{id}Get details of a person
Pipedrive.PersonsApigetPersonActivitiesGET /persons/{id}/activitiesList activities associated with a person
Pipedrive.PersonsApigetPersonDealsGET /persons/{id}/dealsList deals associated with a person
Pipedrive.PersonsApigetPersonFilesGET /persons/{id}/filesList files attached to a person
Pipedrive.PersonsApigetPersonFollowersGET /persons/{id}/followersList followers of a person
Pipedrive.PersonsApigetPersonMailMessagesGET /persons/{id}/mailMessagesList mail messages associated with a person
Pipedrive.PersonsApigetPersonProductsGET /persons/{id}/productsList products associated with a person
Pipedrive.PersonsApigetPersonUpdatesGET /persons/{id}/flowList updates about a person
Pipedrive.PersonsApigetPersonUsersGET /persons/{id}/permittedUsersList permitted users
Pipedrive.PersonsApigetPersonsGET /personsGet all persons
Pipedrive.PersonsApimergePersonsPUT /persons/{id}/mergeMerge two persons
Pipedrive.PersonsApisearchPersonsGET /persons/searchSearch persons
Pipedrive.PersonsApiupdatePersonPUT /persons/{id}Update a person
Pipedrive.PipelinesApiaddPipelinePOST /pipelinesAdd a new pipeline
Pipedrive.PipelinesApideletePipelineDELETE /pipelines/{id}Delete a pipeline
Pipedrive.PipelinesApigetPipelineGET /pipelines/{id}Get one pipeline
Pipedrive.PipelinesApigetPipelineConversionStatisticsGET /pipelines/{id}/conversion_statisticsGet deals conversion rates in pipeline
Pipedrive.PipelinesApigetPipelineDealsGET /pipelines/{id}/dealsGet deals in a pipeline
Pipedrive.PipelinesApigetPipelineMovementStatisticsGET /pipelines/{id}/movement_statisticsGet deals movements in pipeline
Pipedrive.PipelinesApigetPipelinesGET /pipelinesGet all pipelines
Pipedrive.PipelinesApiupdatePipelinePUT /pipelines/{id}Edit a pipeline
Pipedrive.ProductFieldsApiaddProductFieldPOST /productFieldsAdd a new product field
Pipedrive.ProductFieldsApideleteProductFieldDELETE /productFields/{id}Delete a product field
Pipedrive.ProductFieldsApideleteProductFieldsDELETE /productFieldsDelete multiple product fields in bulk
Pipedrive.ProductFieldsApigetProductFieldGET /productFields/{id}Get one product field
Pipedrive.ProductFieldsApigetProductFieldsGET /productFieldsGet all product fields
Pipedrive.ProductFieldsApiupdateProductFieldPUT /productFields/{id}Update a product field
Pipedrive.ProductsApiaddProductPOST /productsAdd a product
Pipedrive.ProductsApiaddProductFollowerPOST /products/{id}/followersAdd a follower to a product
Pipedrive.ProductsApideleteProductDELETE /products/{id}Delete a product
Pipedrive.ProductsApideleteProductFollowerDELETE /products/{id}/followers/{follower_id}Delete a follower from a product
Pipedrive.ProductsApifindProductsByNameGET /products/findFind products by name
Pipedrive.ProductsApigetProductGET /products/{id}Get one product
Pipedrive.ProductsApigetProductDealsGET /products/{id}/dealsGet deals where a product is attached to
Pipedrive.ProductsApigetProductFilesGET /products/{id}/filesList files attached to a product
Pipedrive.ProductsApigetProductFollowersGET /products/{id}/followersList followers of a product
Pipedrive.ProductsApigetProductUsersGET /products/{id}/permittedUsersList permitted users
Pipedrive.ProductsApigetProductsGET /productsGet all products
Pipedrive.ProductsApisearchProductsGET /products/searchSearch products
Pipedrive.ProductsApiupdateProductPUT /products/{id}Update a product
Pipedrive.RecentsApigetRecentsGET /recentsGet recents
Pipedrive.RolesApiaddOrUpdateRoleSettingPOST /roles/{id}/settingsAdd or update role setting
Pipedrive.RolesApiaddRolePOST /rolesAdd a role
Pipedrive.RolesApiaddRoleAssignmentPOST /roles/{id}/assignmentsAdd role assignment
Pipedrive.RolesApideleteRoleDELETE /roles/{id}Delete a role
Pipedrive.RolesApideleteRoleAssignmentDELETE /roles/{id}/assignmentsDelete a role assignment
Pipedrive.RolesApigetRoleGET /roles/{id}Get one role
Pipedrive.RolesApigetRoleAssignmentsGET /roles/{id}/assignmentsList role assignments
Pipedrive.RolesApigetRoleSettingsGET /roles/{id}/settingsList role settings
Pipedrive.RolesApigetRoleSubRolesGET /roles/{id}/rolesList role sub-roles
Pipedrive.RolesApigetRolesGET /rolesGet all roles
Pipedrive.RolesApiupdateRolePUT /roles/{id}Update role details
Pipedrive.SearchResultsApisearchGET /searchResultsPerform a search
Pipedrive.SearchResultsApisearchByFieldGET /searchResults/fieldPerform a search using a specific field value
Pipedrive.StagesApiaddStagePOST /stagesAdd a new stage
Pipedrive.StagesApideleteStageDELETE /stages/{id}Delete a stage
Pipedrive.StagesApideleteStagesDELETE /stagesDelete multiple stages in bulk
Pipedrive.StagesApigetStageGET /stages/{id}Get one stage
Pipedrive.StagesApigetStageDealsGET /stages/{id}/dealsGet deals in a stage
Pipedrive.StagesApigetStagesGET /stagesGet all stages
Pipedrive.StagesApiupdateStagePUT /stages/{id}Update stage details
Pipedrive.SubscriptionsApiaddRecurringSubscriptionPOST /subscriptions/recurringAdd a recurring subscription
Pipedrive.SubscriptionsApiaddSubscriptionInstallmentPOST /subscriptions/installmentAdd an installment subscription
Pipedrive.SubscriptionsApicancelRecurringSubscriptionPUT /subscriptions/recurring/{id}/cancelCancel a recurring subscription
Pipedrive.SubscriptionsApideleteSubscriptionDELETE /subscriptions/{id}Delete a subscription
Pipedrive.SubscriptionsApifindSubscriptionByDealGET /subscriptions/find/{dealId}Find subscription by deal
Pipedrive.SubscriptionsApigetSubscriptionGET /subscriptions/{id}Get details of a subscription
Pipedrive.SubscriptionsApigetSubscriptionPaymentsGET /subscriptions/{id}/paymentsGet all payments of a Subscription
Pipedrive.SubscriptionsApiupdateRecurringSubscriptionPUT /subscriptions/recurring/{id}Update a recurring subscription
Pipedrive.SubscriptionsApiupdateSubscriptionInstallmentPUT /subscriptions/installment/{id}Update an installment subscription
Pipedrive.TeamsApiaddTeamPOST /teamsAdd a new team
Pipedrive.TeamsApiaddTeamUserPOST /teams/{id}/usersAdd users to a team
Pipedrive.TeamsApideleteTeamUserDELETE /teams/{id}/usersDelete users from a team
Pipedrive.TeamsApigetTeamGET /teams/{id}Get a single team
Pipedrive.TeamsApigetTeamUsersGET /teams/{id}/usersGet all users in a team
Pipedrive.TeamsApigetTeamsGET /teamsGet all teams
Pipedrive.TeamsApigetUserTeamsGET /teams/user/{id}Get all teams of a user
Pipedrive.TeamsApiupdateTeamPUT /teams/{id}Update a team
Pipedrive.UserConnectionsApigetUserConnectionsGET /userConnectionsGet all user connections
Pipedrive.UserSettingsApigetUserSettingsGET /userSettingsList settings of an authorized user
Pipedrive.UsersApiaddUserPOST /usersAdd a new user
Pipedrive.UsersApiaddUserBlacklistedEmailPOST /users/{id}/blacklistedEmailsAdd blacklisted email address for a user
Pipedrive.UsersApiaddUserRoleAssignmentPOST /users/{id}/roleAssignmentsAdd role assignment
Pipedrive.UsersApideleteUserRoleAssignmentDELETE /users/{id}/roleAssignmentsDelete a role assignment
Pipedrive.UsersApifindUsersByNameGET /users/findFind users by name
Pipedrive.UsersApigetCurrentUserGET /users/meGet current user data
Pipedrive.UsersApigetUserGET /users/{id}Get one user
Pipedrive.UsersApigetUserBlacklistedEmailsGET /users/{id}/blacklistedEmailsList blacklisted email addresses of a user
Pipedrive.UsersApigetUserFollowersGET /users/{id}/followersList followers of a user
Pipedrive.UsersApigetUserPermissionsGET /users/{id}/permissionsList user permissions
Pipedrive.UsersApigetUserRoleAssignmentsGET /users/{id}/roleAssignmentsList role assignments
Pipedrive.UsersApigetUserRoleSettingsGET /users/{id}/roleSettingsList user role settings
Pipedrive.UsersApigetUsersGET /usersGet all users
Pipedrive.UsersApiupdateUserPUT /users/{id}Update user details
Pipedrive.WebhooksApiaddWebhookPOST /webhooksCreate a new webhook
Pipedrive.WebhooksApideleteWebhookDELETE /webhooks/{id}Delete existing webhook
Pipedrive.WebhooksApigetWebhooksGET /webhooksGet all webhooks

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: api_token
  • Location: URL query string

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://oauth.pipedrive.com/oauth/authorize
  • Scopes:
    • deals:read: Read most data about deals and related entities.
    • deals:full: Create, read, update and delete deals, its participants and followers.
    • activities:read: Read activities, its fields and types; all files and filters.
    • activities:full: Create, read, update and delete activities and all files and filters.
    • contacts:read: Read data about persons and organizations, their related fields and followers.
    • contacts:full: Create, read, update and delete persons and organizations and their followers.
    • admin: Allows to do many things that an administrator can do in a Pipedrive company account.
    • recents:read: Read all recent changes occured in an account.
    • search:read: Search across the account for deals, persons, organizations, files and products and see details about the returned results.
    • mail:read: Read mail threads and messages.
    • mail:full: Read, update and delete mail threads. Also grants read access to mail messages.
    • products:read: Read products, its fields, files, followers and products connected to a deal.
    • products:full: Create, read, update and delete products and its fields; add products to deals
    • users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers, as well as about teams.
    • base: Read settings of the authorized user and currencies in an account.
    • phone-integration: Create, read and delete call logs and its audio recordings.
22.3.1-rc.5

2 days ago

22.6.1

8 days ago

22.6.0

22 days ago

22.3.1-rc.4

2 months ago

22.5.0

3 months ago

22.3.1-rc.3

4 months ago

22.4.0

4 months ago

22.3.1-rc.1

4 months ago

22.3.1-rc.0

4 months ago

22.3.1-rc.2

4 months ago

22.1.0

7 months ago

22.2.0

7 months ago

22.3.0

6 months ago

22.0.2

8 months ago

22.0.1

8 months ago

21.0.0

9 months ago

20.2.0

11 months ago

21.1.0

9 months ago

20.3.0

11 months ago

22.0.0

8 months ago

21.2.0

8 months ago

20.4.0

10 months ago

20.5.0

9 months ago

20.5.2

9 months ago

20.5.1

9 months ago

20.0.1

11 months ago

20.0.0

11 months ago

20.0.2

11 months ago

20.1.0

11 months ago

20.1.1

11 months ago

19.0.1

1 year ago

19.1.0

1 year ago

19.0.0

1 year ago

18.1.4

1 year ago

18.1.3

1 year ago

18.1.2

1 year ago

18.1.1

1 year ago

18.1.0

1 year ago

18.0.3

1 year ago

17.3.0

2 years ago

17.3.1

2 years ago

17.4.0

2 years ago

18.0.2

1 year ago

18.0.1

1 year ago

18.0.0

1 year ago

17.5.0

2 years ago

17.5.2

2 years ago

17.5.1

2 years ago

17.5.4

1 year ago

17.5.3

1 year ago

17.0.0

2 years ago

16.2.0

2 years ago

17.1.2

2 years ago

17.1.1

2 years ago

17.1.4

2 years ago

17.1.3

2 years ago

17.1.0

2 years ago

17.1.5

2 years ago

17.2.0

2 years ago

16.1.0

2 years ago

15.0.2

2 years ago

15.0.0

2 years ago

15.0.1

2 years ago

15.1.0

2 years ago

16.0.1

2 years ago

16.0.0

2 years ago

16.0.4

2 years ago

16.0.3

2 years ago

13.3.3

2 years ago

13.3.4

2 years ago

13.3.1

2 years ago

13.3.2

2 years ago

13.3.0

2 years ago

13.2.9

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

13.2.8

2 years ago

13.2.6

2 years ago

13.2.7

2 years ago

13.0.8

2 years ago

13.0.9

2 years ago

13.0.6

2 years ago

13.0.7

2 years ago

13.0.4

2 years ago

13.0.5

2 years ago

13.0.3

2 years ago

13.1.3

2 years ago

13.1.1

2 years ago

13.1.2

2 years ago

13.1.0

2 years ago

13.0.10

2 years ago

13.0.11

2 years ago

13.0.12

2 years ago

13.2.4

2 years ago

13.2.5

2 years ago

13.2.2

2 years ago

13.2.3

2 years ago

13.2.0

2 years ago

13.2.1

2 years ago

13.0.2

2 years ago

13.0.0

2 years ago

13.0.1

2 years ago

12.2.0

2 years ago

12.0.3

3 years ago

12.0.0

3 years ago

12.0.1

3 years ago

12.0.2

3 years ago

12.0.0-rc.7

3 years ago

12.0.0-rc.8

3 years ago

12.1.0

3 years ago

12.0.0-rc.6

3 years ago

12.0.0-rc.5

3 years ago

12.0.0-rc.4

3 years ago

12.0.0-rc.3

3 years ago

12.0.0-rc.1

3 years ago

12.0.0-rc.2

3 years ago

12.0.0-rc.0

3 years ago

11.0.0-rc.10

3 years ago

11.0.0-rc.11

3 years ago

11.0.0-rc.5

3 years ago

11.0.0-rc.6

3 years ago

11.0.0-rc.7

3 years ago

11.0.0-rc.8

3 years ago

11.0.0-rc.9

3 years ago

10.6.2

3 years ago

11.0.0

3 years ago

10.6.0

3 years ago

10.6.1

3 years ago

11.0.0-rc.2

3 years ago

11.0.0-rc.3

3 years ago

11.0.0-rc.4

3 years ago

10.5.0

3 years ago

11.0.0-rc.1

3 years ago

1.0.1-rc.0

3 years ago

11.0.0-rc.0

3 years ago

10.4.3

4 years ago

10.4.2

4 years ago

10.4.1

4 years ago

10.4.0

4 years ago

10.3.0

4 years ago

10.2.2

4 years ago

10.2.1

4 years ago

10.2.0

4 years ago

10.0.1

4 years ago

10.0.0

4 years ago

9.2.0

4 years ago

9.1.1

4 years ago

9.1.0

4 years ago

9.0.0

5 years ago

8.0.0

5 years ago

7.0.0

5 years ago

6.0.4

5 years ago

6.0.3

5 years ago

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.0

6 years ago

4.0.0

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

9 years ago

2.0.0

9 years ago

1.7.3

9 years ago

1.7.2

10 years ago

1.7.1

10 years ago

1.7.0

10 years ago

1.6.4

10 years ago

1.6.3

10 years ago

1.6.2

10 years ago

1.6.1

10 years ago

1.5.10

11 years ago

1.5.9

11 years ago

1.5.8

11 years ago

1.5.7

11 years ago

1.5.6

11 years ago

1.5.5

11 years ago

1.5.4

11 years ago

1.5.3

11 years ago

1.5.2

11 years ago

1.5.1

11 years ago

1.5.0

11 years ago

1.4.2

11 years ago

1.4.1

11 years ago

1.4.0

11 years ago

1.3.2

11 years ago

1.3.1

11 years ago

1.2.7

11 years ago

1.2.6

11 years ago

1.2.5

11 years ago

1.2.4

11 years ago

1.2.3

11 years ago

1.2.2

11 years ago

1.2.1

11 years ago

1.1.2

12 years ago

1.1.1

12 years ago

1.1.0

12 years ago

1.0.5

12 years ago

1.0.4

12 years ago

1.0.3

12 years ago

1.0.2

12 years ago

1.0.1

12 years ago

1.0.0

12 years ago