Partner tier
Pipedrive Platinum Partner
Work delivered
150+ CRM implementations
Global rank
Top 8 Pipedrive partner worldwide, July 2026 · 2026 Top New ARR Partner Award

Glossary

API tokens and webhooks

An API token is a secret that lets code call the Pipedrive API as one user, sent in the x-api-token header. A webhook is the reverse: Pipedrive POSTs to your URL when a record is created, changed or deleted.

Spec sheet
API token
A key that lets code act as a userCarries that user's full permissions.
Webhook
A message Pipedrive sends on a changePush, not pull. Fire and forget.
Use together
Webhook triggers, API fetchesThe notification is a nudge, not the data.
Verdict
Powerful, and easy to leakService user, least access, planned rotation.

The definitions side by side

API tokenOAuthWebhook
DirectionYou call PipedriveYou call PipedrivePipedrive calls you
Belongs toOne userAn app, per scopeA subscription on an event
Best forInternal scripts you controlAnything you distributeReacting to changes without polling

An API token identifies one user account to the Pipedrive API. Code that holds the token can do whatever that user can do: read every deal that user can see, create records, and change them. There is no second factor on a token. It is the whole credential, which is why it deserves the care you give a password. A token is a key you use. A webhook is a doorbell Pipedrive rings. Most real integrations use both, and the order matters.

Authenticating against API v2

Send the token in the x-api-token header on every request, against your company domain and the /api/v2/ path:

curl "https://yourcompany.pipedrive.com/api/v2/deals?limit=100" \
  -H "x-api-token: $PIPEDRIVE_API_TOKEN"

Read the token from an environment variable or a secrets manager, never from the source file. Only one API token is active per user at a time, so regenerating it breaks every integration still holding the old value. Requests that exceed the rate limits come back as HTTP 429, and the right response is to back off and retry, not to hammer. Not every resource has moved to v2 yet, so check the reference for each endpoint you need.

Cursor pagination in v2

List endpoints in API v2 page with a cursor, not with an offset. You send limit (the default is 100, the maximum is 500). Each response carries additional_data.next_cursor. Pass that value back as the cursor parameter on the next request, and stop when it comes back null. The cursor is opaque: do not parse it, build it, or store it for days. The older v1 endpoints use start and limit instead, so a client that calls both needs both paging loops.

How webhooks behave

You register a URL together with an event action and an event object. The actions are create, change and delete, or * for all of them, and the objects include deal, person, organization, activity, lead, note, pipeline and stage. Pipedrive then sends an HTTP POST with a JSON body in three blocks:

  • meta: the action, entity, entity id, timestamp, webhook id, delivery attempt and whether the change came from the app or the API.
  • data: the current state of the object for create and change events, and null for delete.
  • previous: for a change, only the fields that changed with their earlier values. For a delete, the last known state.

Webhooks can be created in Pipedrive's settings, in the webhooks section under tools and apps, or through the API with a POST to /v1/webhooks that carries subscription_url, event_action and event_object. Optional fields include HTTP basic auth credentials for your endpoint, the user the webhook runs as, and a version that selects the payload format. The user decides what the webhook can see: events only arrive for objects that user can access. The URL must be publicly reachable, and each user is limited to 40 webhooks.

A worked example (illustrative)

Take a company that wants an invoice raised when a deal is won. The naive build polls the API every ten minutes and asks for won deals. That is 1,008 calls a week, almost all of them returning nothing, and invoices lag by up to ten minutes. The webhook build registers one subscription: action change, object deal. When a payload arrives, the integration checks that data.status is won and previous.status was not, fetches the full deal with the token, and raises the invoice while the rep is still smiling. The numbers are illustrative, the pattern holds.

The pattern behind that is worth memorizing. The webhook tells you something changed. The API call gets the current truth. Messages can arrive late, twice or out of order, so fetch the record before you act on it, and make the handler idempotent. Everything that can be built inside Pipedrive itself, rather than outside, is usually simpler and belongs in automations instead.

How to set it up safely

Create a dedicated user for the integration. Give it a real mailbox you control and a permission set limited to what the integration needs, using permissions and visibility. Take the API token from that user's personal preferences, under the API tab. Never use a founder account or the account of the person who happens to be building it. When that person leaves and their seat is removed, every integration on their token stops in the same hour.

Point webhooks at an HTTPS endpoint, narrow the event and object as far as you can, and protect the endpoint with the basic auth credentials Pipedrive supports. A public URL that writes into your systems is an open door. Any code reading these events needs the record structure in the CRM data model, because a webhook returns ids and expects you to know what they point at.

Common mistakes

  • The token in the wrong place. Tokens end up pasted in a shared document, in a browser based automation tool, or committed to a repository. Treat every token as production access to your customer database, because that is what it is.
  • Trusting delivery. An endpoint that was down for an hour has simply missed those events once the retries are spent. Every serious integration needs a nightly reconciliation that catches what the push layer dropped.
  • Loops. A webhook writes back to Pipedrive, which fires the same webhook again. Filter on the change source or the changed field to break the circle.
  • Slow handlers. The endpoint has 10 seconds to answer. Acknowledge immediately with a 2xx and do the work afterwards.
  • Treating the API as a mail server. It is not, and the correct route for that is email sync.

Related terms and guides

Before you wire an AI assistant or a third party to the same credentials, read connecting AI to your CRM safely. For what the API can and cannot report, see reporting Pipedrive cannot do. More terms are in the glossary.

Last reviewed: October 2026.

Questions

Next step

Not sure whether your setup is ready for this?

Ten questions about process, data, ownership and reporting. You get a readiness score on screen, and the written advice by email.

Built by a Pipedrive Platinum Partner, rated 5.0 from 11 Marketplace reviews.