Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

pipedrive

Package Overview
Dependencies
Maintainers
3
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipedrive

Pipedrive REST client for NodeJS

next
Source
npmnpm
Version
23.3.0-rc.4
Version published
Weekly downloads
47K
-2.35%
Maintainers
3
Weekly downloads
 
Created
Source

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 license. 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@1.0.0 --save

API Reference

The Pipedrive RESTful API Reference can be found at https://developers.pipedrive.com/docs/api/v1. Pipedrive API’s core concepts for its usage can be found in our Developer documentation.

How to use it?

With a pre-set API token

You can retrieve the api_token from your existing Pipedrive account’s settings page. A step-by-step guide is available here.

import express from "express";
import { Configuration, DealsApi } from "pipedrive";

const app = express();

const PORT = 3000;

// Configure Client with API key authorization
const apiConfig = new Configuration({
  apiKey: "YOUR_API_TOKEN_HERE",
});

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

app.get("/", async (req, res) => {
  const dealsApi = new DealsApi(apiConfig);
  const response = await dealsApi.getDeals();
  const { data: deals } = response;

  res.send(deals);
});

With OAuth 2

If you would like to use an OAuth access token for making API calls, then make sure the API key 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.

To set up authentication in the API client, you need the following information. You can receive the necessary client tokens through a Sandbox account (get it here) and generate the tokens (detailed steps here).

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

Next, initialize the API client as follows:

import { OAuth2Configuration, Configuration } from 'pipedrive';

// Configuration parameters and credentials
const oauth2 = new OAuth2Configuration({
  clientId: "clientId", // OAuth 2 Client ID
  clientSecret: "clientSecret",  // OAuth 2 Client Secret
  redirectUri: 'redirectUri' // OAuth 2 Redirection endpoint or Callback Uri
});

const apiConfig = new Configuration({
    accessToken: oauth2.getAccessToken,
    basePath: oauth2.basePath,
});

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 the user's behalf. Details about how the OAuth2.0 flow works in Pipedrive, how long tokens are valid, and more, can be found here.

To obtain user's consent, you must redirect the user to the authorization page. The authorizationUrl returns the URL to the authorization page.

// open up the authUrl in the browser
const authUrl = oauth2.authorizationUrl;

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 OAuth2Configuration class. Additionally access token expiration time as an OAuth2Configuration.expiresAt field is calculated. It is measured in the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.

const token = await oauth2.authorize(code);

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

Refreshing token

Access tokens may expire after sometime, if it necessary you can do it manually.

const newToken = await oauth2.tokenRefresh();

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.

import express from "express";
import cookieParse from "cookie-parser";
import cookeSession from "cookie-session";
import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive";

const app = express();

app.use(cookieParser());
app.use(cookieSession({
    name: "session",
    keys: ["key1"]
}));

...

// store access token in the session
// note that this is only the access token field value not the whole token object
req.session.accessToken = await oauth.getAccessToken();

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.

oauth2.onTokenUpdate = 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.

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.


import express from "express";
import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive";
import cookieParser from "cookie-parser";
import cookieSession from "cookie-session";

const app = express();

app.use(cookieParser());
app.use(cookieSession({
    name: "session",
    keys: ["key1"]
}));

const PORT = 3000;


const oauth2 = new OAuth2Configuration({
    clientId: "clientId", // OAuth 2 Client ID
    clientSecret: "clientSecret",  // OAuth 2 Client Secret
    redirectUri: 'redirectUri' // OAuth 2 Redirection endpoint or Callback Uri
});

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

app.get('/', async (req, res) => {
try {
    // method will handle return null if token is not available in the session
    const token = oauth2.updateToken(req.session?.accessToken);

     if (!token) {
        const authUrl = oauth2.authorizationUrl;
        return res.redirect(authUrl);
    }


    const apiConfig = new Configuration({
        accessToken: oauth2.getAccessToken,
        basePath: oauth2.basePath,
    });

    // 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 dealsApi = new DealsApi(apiConfig)

    const response = await dealsApi.getDeals();
    const { data: deals } = response;

    return res.send(deals);
} catch (error){
    console.error(error)
    return res.status(500).send(error)
}
});

app.get('/callback', async (req, res) => {
    try {
        const authCode = req.query.code as string;
        const newAccessToken = await oauth2.authorize(authCode);

        req.session.accessToken = newAccessToken;
        return res.redirect("/");
    }catch (error) {
        console.error(error)
        return res.status(500).send(error)
    }
});

List of API Endpoints

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

ClassMethodHTTP requestDescription
ActivitiesApiaddActivityPOST /activitiesAdd an activity
ActivitiesApideleteActivitiesDELETE /activitiesDelete multiple activities in bulk
ActivitiesApideleteActivityDELETE /activities/{id}Delete an activity
ActivitiesApigetActivitiesGET /activitiesGet all activities assigned to a particular user
ActivitiesApigetActivitiesCollectionGET /activities/collectionGet all activities (BETA)
ActivitiesApigetActivityGET /activities/{id}Get details of an activity
ActivitiesApiupdateActivityPUT /activities/{id}Update an activity
ActivityFieldsApigetActivityFieldsGET /activityFieldsGet all activity fields
ActivityTypesApiaddActivityTypePOST /activityTypesAdd new activity type
ActivityTypesApideleteActivityTypeDELETE /activityTypes/{id}Delete an activity type
ActivityTypesApideleteActivityTypesDELETE /activityTypesDelete multiple activity types in bulk
ActivityTypesApigetActivityTypesGET /activityTypesGet all activity types
ActivityTypesApiupdateActivityTypePUT /activityTypes/{id}Update an activity type
BillingApigetCompanyAddonsGET /billing/subscriptions/addonsGet all add-ons for a single company
CallLogsApiaddCallLogPOST /callLogsAdd a call log
CallLogsApiaddCallLogAudioFilePOST /callLogs/{id}/recordingsAttach an audio file to the call log
CallLogsApideleteCallLogDELETE /callLogs/{id}Delete a call log
CallLogsApigetCallLogGET /callLogs/{id}Get details of a call log
CallLogsApigetUserCallLogsGET /callLogsGet all call logs assigned to a particular user
ChannelsApiaddChannelPOST /channelsAdd a channel
ChannelsApideleteChannelDELETE /channels/{id}Delete a channel
ChannelsApideleteConversationDELETE /channels/{channel-id}/conversations/{conversation-id}Delete a conversation
ChannelsApireceiveMessagePOST /channels/messages/receiveReceives an incoming message
CurrenciesApigetCurrenciesGET /currenciesGet all supported currencies
DealFieldsApiaddDealFieldPOST /dealFieldsAdd a new deal field
DealFieldsApideleteDealFieldDELETE /dealFields/{id}Delete a deal field
DealFieldsApideleteDealFieldsDELETE /dealFieldsDelete multiple deal fields in bulk
DealFieldsApigetDealFieldGET /dealFields/{id}Get one deal field
DealFieldsApigetDealFieldsGET /dealFieldsGet all deal fields
DealFieldsApiupdateDealFieldPUT /dealFields/{id}Update a deal field
DealsApiaddDealPOST /dealsAdd a deal
DealsApiaddDealFollowerPOST /deals/{id}/followersAdd a follower to a deal
DealsApiaddDealParticipantPOST /deals/{id}/participantsAdd a participant to a deal
DealsApiaddDealProductPOST /deals/{id}/productsAdd a product to a deal
DealsApideleteDealDELETE /deals/{id}Delete a deal
DealsApideleteDealFollowerDELETE /deals/{id}/followers/{follower_id}Delete a follower from a deal
DealsApideleteDealParticipantDELETE /deals/{id}/participants/{deal_participant_id}Delete a participant from a deal
DealsApideleteDealProductDELETE /deals/{id}/products/{product_attachment_id}Delete an attached product from a deal
DealsApideleteDealsDELETE /dealsDelete multiple deals in bulk
DealsApiduplicateDealPOST /deals/{id}/duplicateDuplicate deal
DealsApigetDealGET /deals/{id}Get details of a deal
DealsApigetDealActivitiesGET /deals/{id}/activitiesList activities associated with a deal
DealsApigetDealChangelogGET /deals/{id}/changelogList updates about deal field values
DealsApigetDealFilesGET /deals/{id}/filesList files attached to a deal
DealsApigetDealFollowersGET /deals/{id}/followersList followers of a deal
DealsApigetDealMailMessagesGET /deals/{id}/mailMessagesList mail messages associated with a deal
DealsApigetDealParticipantsGET /deals/{id}/participantsList participants of a deal
DealsApigetDealParticipantsChangelogGET /deals/{id}/participantsChangelogList updates about participants of a deal
DealsApigetDealPersonsGET /deals/{id}/personsList all persons associated with a deal
DealsApigetDealProductsGET /deals/{id}/productsList products attached to a deal
DealsApigetDealUpdatesGET /deals/{id}/flowList updates about a deal
DealsApigetDealUsersGET /deals/{id}/permittedUsersList permitted users
DealsApigetDealsGET /dealsGet all deals
DealsApigetDealsCollectionGET /deals/collectionGet all deals (BETA)
DealsApigetDealsSummaryGET /deals/summaryGet deals summary
DealsApigetDealsTimelineGET /deals/timelineGet deals timeline
DealsApimergeDealsPUT /deals/{id}/mergeMerge two deals
DealsApisearchDealsGET /deals/searchSearch deals
DealsApiupdateDealPUT /deals/{id}Update a deal
DealsApiupdateDealProductPUT /deals/{id}/products/{product_attachment_id}Update the product attached to a deal
FilesApiaddFilePOST /filesAdd file
FilesApiaddFileAndLinkItPOST /files/remoteCreate a remote file and link it to an item
FilesApideleteFileDELETE /files/{id}Delete a file
FilesApidownloadFileGET /files/{id}/downloadDownload one file
FilesApigetFileGET /files/{id}Get one file
FilesApigetFilesGET /filesGet all files
FilesApilinkFileToItemPOST /files/remoteLinkLink a remote file to an item
FilesApiupdateFilePUT /files/{id}Update file details
FiltersApiaddFilterPOST /filtersAdd a new filter
FiltersApideleteFilterDELETE /filters/{id}Delete a filter
FiltersApideleteFiltersDELETE /filtersDelete multiple filters in bulk
FiltersApigetFilterGET /filters/{id}Get one filter
FiltersApigetFilterHelpersGET /filters/helpersGet all filter helpers
FiltersApigetFiltersGET /filtersGet all filters
FiltersApiupdateFilterPUT /filters/{id}Update filter
GoalsApiaddGoalPOST /goalsAdd a new goal
GoalsApideleteGoalDELETE /goals/{id}Delete existing goal
GoalsApigetGoalResultGET /goals/{id}/resultsGet result of a goal
GoalsApigetGoalsGET /goals/findFind goals
GoalsApiupdateGoalPUT /goals/{id}Update existing goal
ItemSearchApisearchItemGET /itemSearchPerform a search from multiple item types
ItemSearchApisearchItemByFieldGET /itemSearch/fieldPerform a search using a specific field from an item type
LeadLabelsApiaddLeadLabelPOST /leadLabelsAdd a lead label
LeadLabelsApideleteLeadLabelDELETE /leadLabels/{id}Delete a lead label
LeadLabelsApigetLeadLabelsGET /leadLabelsGet all lead labels
LeadLabelsApiupdateLeadLabelPATCH /leadLabels/{id}Update a lead label
LeadSourcesApigetLeadSourcesGET /leadSourcesGet all lead sources
LeadsApiaddLeadPOST /leadsAdd a lead
LeadsApideleteLeadDELETE /leads/{id}Delete a lead
LeadsApigetLeadGET /leads/{id}Get one lead
LeadsApigetLeadUsersGET /leads/{id}/permittedUsersList permitted users
LeadsApigetLeadsGET /leadsGet all leads
LeadsApisearchLeadsGET /leads/searchSearch leads
LeadsApiupdateLeadPATCH /leads/{id}Update a lead
LegacyTeamsApiaddTeamPOST /legacyTeamsAdd a new team
LegacyTeamsApiaddTeamUserPOST /legacyTeams/{id}/usersAdd users to a team
LegacyTeamsApideleteTeamUserDELETE /legacyTeams/{id}/usersDelete users from a team
LegacyTeamsApigetTeamGET /legacyTeams/{id}Get a single team
LegacyTeamsApigetTeamUsersGET /legacyTeams/{id}/usersGet all users in a team
LegacyTeamsApigetTeamsGET /legacyTeamsGet all teams
LegacyTeamsApigetUserTeamsGET /legacyTeams/user/{id}Get all teams of a user
LegacyTeamsApiupdateTeamPUT /legacyTeams/{id}Update a team
MailboxApideleteMailThreadDELETE /mailbox/mailThreads/{id}Delete mail thread
MailboxApigetMailMessageGET /mailbox/mailMessages/{id}Get one mail message
MailboxApigetMailThreadGET /mailbox/mailThreads/{id}Get one mail thread
MailboxApigetMailThreadMessagesGET /mailbox/mailThreads/{id}/mailMessagesGet all mail messages of mail thread
MailboxApigetMailThreadsGET /mailbox/mailThreadsGet mail threads
MailboxApiupdateMailThreadDetailsPUT /mailbox/mailThreads/{id}Update mail thread details
MeetingsApideleteUserProviderLinkDELETE /meetings/userProviderLinks/{id}Delete the link between a user and the installed video call integration
MeetingsApisaveUserProviderLinkPOST /meetings/userProviderLinksLink a user with the installed video call integration
NoteFieldsApigetNoteFieldsGET /noteFieldsGet all note fields
NotesApiaddNotePOST /notesAdd a note
NotesApiaddNoteCommentPOST /notes/{id}/commentsAdd a comment to a note
NotesApideleteCommentDELETE /notes/{id}/comments/{commentId}Delete a comment related to a note
NotesApideleteNoteDELETE /notes/{id}Delete a note
NotesApigetCommentGET /notes/{id}/comments/{commentId}Get one comment
NotesApigetNoteGET /notes/{id}Get one note
NotesApigetNoteCommentsGET /notes/{id}/commentsGet all comments for a note
NotesApigetNotesGET /notesGet all notes
NotesApiupdateCommentForNotePUT /notes/{id}/comments/{commentId}Update a comment related to a note
NotesApiupdateNotePUT /notes/{id}Update a note
OrganizationFieldsApiaddOrganizationFieldPOST /organizationFieldsAdd a new organization field
OrganizationFieldsApideleteOrganizationFieldDELETE /organizationFields/{id}Delete an organization field
OrganizationFieldsApideleteOrganizationFieldsDELETE /organizationFieldsDelete multiple organization fields in bulk
OrganizationFieldsApigetOrganizationFieldGET /organizationFields/{id}Get one organization field
OrganizationFieldsApigetOrganizationFieldsGET /organizationFieldsGet all organization fields
OrganizationFieldsApiupdateOrganizationFieldPUT /organizationFields/{id}Update an organization field
OrganizationRelationshipsApiaddOrganizationRelationshipPOST /organizationRelationshipsCreate an organization relationship
OrganizationRelationshipsApideleteOrganizationRelationshipDELETE /organizationRelationships/{id}Delete an organization relationship
OrganizationRelationshipsApigetOrganizationRelationshipGET /organizationRelationships/{id}Get one organization relationship
OrganizationRelationshipsApigetOrganizationRelationshipsGET /organizationRelationshipsGet all relationships for organization
OrganizationRelationshipsApiupdateOrganizationRelationshipPUT /organizationRelationships/{id}Update an organization relationship
OrganizationsApiaddOrganizationPOST /organizationsAdd an organization
OrganizationsApiaddOrganizationFollowerPOST /organizations/{id}/followersAdd a follower to an organization
OrganizationsApideleteOrganizationDELETE /organizations/{id}Delete an organization
OrganizationsApideleteOrganizationFollowerDELETE /organizations/{id}/followers/{follower_id}Delete a follower from an organization
OrganizationsApideleteOrganizationsDELETE /organizationsDelete multiple organizations in bulk
OrganizationsApigetOrganizationGET /organizations/{id}Get details of an organization
OrganizationsApigetOrganizationActivitiesGET /organizations/{id}/activitiesList activities associated with an organization
OrganizationsApigetOrganizationChangelogGET /organizations/{id}/changelogList updates about organization field values
OrganizationsApigetOrganizationDealsGET /organizations/{id}/dealsList deals associated with an organization
OrganizationsApigetOrganizationFilesGET /organizations/{id}/filesList files attached to an organization
OrganizationsApigetOrganizationFollowersGET /organizations/{id}/followersList followers of an organization
OrganizationsApigetOrganizationMailMessagesGET /organizations/{id}/mailMessagesList mail messages associated with an organization
OrganizationsApigetOrganizationPersonsGET /organizations/{id}/personsList persons of an organization
OrganizationsApigetOrganizationUpdatesGET /organizations/{id}/flowList updates about an organization
OrganizationsApigetOrganizationUsersGET /organizations/{id}/permittedUsersList permitted users
OrganizationsApigetOrganizationsGET /organizationsGet all organizations
OrganizationsApigetOrganizationsCollectionGET /organizations/collectionGet all organizations (BETA)
OrganizationsApimergeOrganizationsPUT /organizations/{id}/mergeMerge two organizations
OrganizationsApisearchOrganizationGET /organizations/searchSearch organizations
OrganizationsApiupdateOrganizationPUT /organizations/{id}Update an organization
PermissionSetsApigetPermissionSetGET /permissionSets/{id}Get one permission set
PermissionSetsApigetPermissionSetAssignmentsGET /permissionSets/{id}/assignmentsList permission set assignments
PermissionSetsApigetPermissionSetsGET /permissionSetsGet all permission sets
PersonFieldsApiaddPersonFieldPOST /personFieldsAdd a new person field
PersonFieldsApideletePersonFieldDELETE /personFields/{id}Delete a person field
PersonFieldsApideletePersonFieldsDELETE /personFieldsDelete multiple person fields in bulk
PersonFieldsApigetPersonFieldGET /personFields/{id}Get one person field
PersonFieldsApigetPersonFieldsGET /personFieldsGet all person fields
PersonFieldsApiupdatePersonFieldPUT /personFields/{id}Update a person field
PersonsApiaddPersonPOST /personsAdd a person
PersonsApiaddPersonFollowerPOST /persons/{id}/followersAdd a follower to a person
PersonsApiaddPersonPicturePOST /persons/{id}/pictureAdd person picture
PersonsApideletePersonDELETE /persons/{id}Delete a person
PersonsApideletePersonFollowerDELETE /persons/{id}/followers/{follower_id}Delete a follower from a person
PersonsApideletePersonPictureDELETE /persons/{id}/pictureDelete person picture
PersonsApideletePersonsDELETE /personsDelete multiple persons in bulk
PersonsApigetPersonGET /persons/{id}Get details of a person
PersonsApigetPersonActivitiesGET /persons/{id}/activitiesList activities associated with a person
PersonsApigetPersonChangelogGET /persons/{id}/changelogList updates about person field values
PersonsApigetPersonDealsGET /persons/{id}/dealsList deals associated with a person
PersonsApigetPersonFilesGET /persons/{id}/filesList files attached to a person
PersonsApigetPersonFollowersGET /persons/{id}/followersList followers of a person
PersonsApigetPersonMailMessagesGET /persons/{id}/mailMessagesList mail messages associated with a person
PersonsApigetPersonProductsGET /persons/{id}/productsList products associated with a person
PersonsApigetPersonUpdatesGET /persons/{id}/flowList updates about a person
PersonsApigetPersonUsersGET /persons/{id}/permittedUsersList permitted users
PersonsApigetPersonsGET /personsGet all persons
PersonsApigetPersonsCollectionGET /persons/collectionGet all persons (BETA)
PersonsApimergePersonsPUT /persons/{id}/mergeMerge two persons
PersonsApisearchPersonsGET /persons/searchSearch persons
PersonsApiupdatePersonPUT /persons/{id}Update a person
PipelinesApiaddPipelinePOST /pipelinesAdd a new pipeline
PipelinesApideletePipelineDELETE /pipelines/{id}Delete a pipeline
PipelinesApigetPipelineGET /pipelines/{id}Get one pipeline
PipelinesApigetPipelineConversionStatisticsGET /pipelines/{id}/conversion_statisticsGet deals conversion rates in pipeline
PipelinesApigetPipelineDealsGET /pipelines/{id}/dealsGet deals in a pipeline
PipelinesApigetPipelineMovementStatisticsGET /pipelines/{id}/movement_statisticsGet deals movements in pipeline
PipelinesApigetPipelinesGET /pipelinesGet all pipelines
PipelinesApiupdatePipelinePUT /pipelines/{id}Update a pipeline
ProductFieldsApiaddProductFieldPOST /productFieldsAdd a new product field
ProductFieldsApideleteProductFieldDELETE /productFields/{id}Delete a product field
ProductFieldsApideleteProductFieldsDELETE /productFieldsDelete multiple product fields in bulk
ProductFieldsApigetProductFieldGET /productFields/{id}Get one product field
ProductFieldsApigetProductFieldsGET /productFieldsGet all product fields
ProductFieldsApiupdateProductFieldPUT /productFields/{id}Update a product field
ProductsApiaddProductPOST /productsAdd a product
ProductsApiaddProductFollowerPOST /products/{id}/followersAdd a follower to a product
ProductsApideleteProductDELETE /products/{id}Delete a product
ProductsApideleteProductFollowerDELETE /products/{id}/followers/{follower_id}Delete a follower from a product
ProductsApigetProductGET /products/{id}Get one product
ProductsApigetProductDealsGET /products/{id}/dealsGet deals where a product is attached to
ProductsApigetProductFilesGET /products/{id}/filesList files attached to a product
ProductsApigetProductFollowersGET /products/{id}/followersList followers of a product
ProductsApigetProductUsersGET /products/{id}/permittedUsersList permitted users
ProductsApigetProductsGET /productsGet all products
ProductsApisearchProductsGET /products/searchSearch products
ProductsApiupdateProductPUT /products/{id}Update a product
ProjectTemplatesApigetProjectTemplateGET /projectTemplates/{id}Get details of a template
ProjectTemplatesApigetProjectTemplatesGET /projectTemplatesGet all project templates
ProjectTemplatesApigetProjectsBoardGET /projects/boards/{id}Get details of a board
ProjectTemplatesApigetProjectsPhaseGET /projects/phases/{id}Get details of a phase
ProjectsApiaddProjectPOST /projectsAdd a project
ProjectsApiarchiveProjectPOST /projects/{id}/archiveArchive a project
ProjectsApideleteProjectDELETE /projects/{id}Delete a project
ProjectsApigetProjectGET /projects/{id}Get details of a project
ProjectsApigetProjectActivitiesGET /projects/{id}/activitiesReturns project activities
ProjectsApigetProjectGroupsGET /projects/{id}/groupsReturns project groups
ProjectsApigetProjectPlanGET /projects/{id}/planReturns project plan
ProjectsApigetProjectTasksGET /projects/{id}/tasksReturns project tasks
ProjectsApigetProjectsGET /projectsGet all projects
ProjectsApigetProjectsBoardsGET /projects/boardsGet all project boards
ProjectsApigetProjectsPhasesGET /projects/phasesGet project phases
ProjectsApiputProjectPlanActivityPUT /projects/{id}/plan/activities/{activityId}Update activity in project plan
ProjectsApiputProjectPlanTaskPUT /projects/{id}/plan/tasks/{taskId}Update task in project plan
ProjectsApiupdateProjectPUT /projects/{id}Update a project
RecentsApigetRecentsGET /recentsGet recents
RolesApiaddOrUpdateRoleSettingPOST /roles/{id}/settingsAdd or update role setting
RolesApiaddRolePOST /rolesAdd a role
RolesApiaddRoleAssignmentPOST /roles/{id}/assignmentsAdd role assignment
RolesApideleteRoleDELETE /roles/{id}Delete a role
RolesApideleteRoleAssignmentDELETE /roles/{id}/assignmentsDelete a role assignment
RolesApigetRoleGET /roles/{id}Get one role
RolesApigetRoleAssignmentsGET /roles/{id}/assignmentsList role assignments
RolesApigetRolePipelinesGET /roles/{id}/pipelinesList pipeline visibility for a role
RolesApigetRoleSettingsGET /roles/{id}/settingsList role settings
RolesApigetRolesGET /rolesGet all roles
RolesApiupdateRolePUT /roles/{id}Update role details
RolesApiupdateRolePipelinesPUT /roles/{id}/pipelinesUpdate pipeline visibility for a role
StagesApiaddStagePOST /stagesAdd a new stage
StagesApideleteStageDELETE /stages/{id}Delete a stage
StagesApideleteStagesDELETE /stagesDelete multiple stages in bulk
StagesApigetStageGET /stages/{id}Get one stage
StagesApigetStageDealsGET /stages/{id}/dealsGet deals in a stage
StagesApigetStagesGET /stagesGet all stages
StagesApiupdateStagePUT /stages/{id}Update stage details
SubscriptionsApiaddRecurringSubscriptionPOST /subscriptions/recurringAdd a recurring subscription
SubscriptionsApiaddSubscriptionInstallmentPOST /subscriptions/installmentAdd an installment subscription
SubscriptionsApicancelRecurringSubscriptionPUT /subscriptions/recurring/{id}/cancelCancel a recurring subscription
SubscriptionsApideleteSubscriptionDELETE /subscriptions/{id}Delete a subscription
SubscriptionsApifindSubscriptionByDealGET /subscriptions/find/{dealId}Find subscription by deal
SubscriptionsApigetSubscriptionGET /subscriptions/{id}Get details of a subscription
SubscriptionsApigetSubscriptionPaymentsGET /subscriptions/{id}/paymentsGet all payments of a subscription
SubscriptionsApiupdateRecurringSubscriptionPUT /subscriptions/recurring/{id}Update a recurring subscription
SubscriptionsApiupdateSubscriptionInstallmentPUT /subscriptions/installment/{id}Update an installment subscription
TasksApiaddTaskPOST /tasksAdd a task
TasksApideleteTaskDELETE /tasks/{id}Delete a task
TasksApigetTaskGET /tasks/{id}Get details of a task
TasksApigetTasksGET /tasksGet all tasks
TasksApiupdateTaskPUT /tasks/{id}Update a task
UserConnectionsApigetUserConnectionsGET /userConnectionsGet all user connections
UserSettingsApigetUserSettingsGET /userSettingsList settings of an authorized user
UsersApiaddUserPOST /usersAdd a new user
UsersApifindUsersByNameGET /users/findFind users by name
UsersApigetCurrentUserGET /users/meGet current user data
UsersApigetUserGET /users/{id}Get one user
UsersApigetUserFollowersGET /users/{id}/followersList followers of a user
UsersApigetUserPermissionsGET /users/{id}/permissionsList user permissions
UsersApigetUserRoleAssignmentsGET /users/{id}/roleAssignmentsList role assignments
UsersApigetUserRoleSettingsGET /users/{id}/roleSettingsList user role settings
UsersApigetUsersGET /usersGet all users
UsersApiupdateUserPUT /users/{id}Update user details
WebhooksApiaddWebhookPOST /webhooksCreate a new Webhook
WebhooksApideleteWebhookDELETE /webhooks/{id}Delete existing Webhook
WebhooksApigetWebhooksGET /webhooksGet all Webhooks

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:
    • base: Read settings of the authorized user and currencies in an account
  • deals:read: Read most of the data about deals and related entities - deal fields, products, followers, participants; all notes, files, filters, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
  • deals:full: Create, read, update and delete deals, its participants and followers; all files, notes, and filters. It also includes read access to deal fields, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
  • mail:read: Read mail threads and messages
  • mail:full: Read, update and delete mail threads. Also grants read access to mail messages
  • 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. Also includes read access to activity fields and types
  • contacts:read: Read the data about persons and organizations, their related fields and followers; also all notes, files, filters
  • contacts:full: Create, read, update and delete persons and organizations and their followers; all notes, files, filters. Also grants read access to contacts-related fields
  • 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
  • projects:read: Read projects and its fields, tasks and project templates
  • projects:full: Create, read, update and delete projects and its fields; add projects templates and project related tasks
  • users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers
  • recents:read: Read all recent changes occurred in an account. Includes data about activities, activity types, deals, files, filters, notes, persons, organizations, pipelines, stages, products and users
  • search:read: Search across the account for deals, persons, organizations, files and products, and see details about the returned results
  • admin: Allows to do many things that an administrator can do in a Pipedrive company account - create, read, update and delete pipelines and its stages; deal, person and organization fields; activity types; users and permissions, etc. It also allows the app to create webhooks and fetch and delete webhooks that are created by the app
  • leads:read: Read data about leads and lead labels
  • leads:full: Create, read, update and delete leads and lead labels
  • phone-integration: Enables advanced call integration features like logging call duration and other metadata, and play call recordings inside Pipedrive
  • goals:read: Read data on all goals
  • goals:full: Create, read, update and delete goals
  • video-calls: Allows application to register as a video call integration provider and create conference links
  • messengers-integration: Allows application to register as a messengers integration provider and allows them to deliver incoming messages and their statuses

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts