PHPackages                             pinvoice/pipedrive-php-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. pinvoice/pipedrive-php-api

ActiveLibrary[API Development](/categories/api)

pinvoice/pipedrive-php-api
==========================

PHP API for Pipedrive

63277[3 PRs](https://github.com/Pinvoice/pipedrive-php-api/pulls)PHP

Since Sep 16Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Pinvoice/pipedrive-php-api)[ Packagist](https://packagist.org/packages/pinvoice/pipedrive-php-api)[ RSS](/packages/pinvoice-pipedrive-php-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

pipedrive-php-api
=================

[](#pipedrive-php-api)

PHP API for Pipedrive. Work in progress!

[![Latest Stable Version](https://camo.githubusercontent.com/2782ccf5900eba916d2cbaad741f9acd8e13fd1d5db46f38b572dcab7164864e/68747470733a2f2f706f7365722e707567782e6f72672f70696e766f6963652f7069706564726976652d7068702d6170692f762f737461626c652e737667)](https://packagist.org/packages/pinvoice/pipedrive-php-api) [![Total Downloads](https://camo.githubusercontent.com/55464b0267f6e537749597e5431ec9b137b3312c419d8f22cb86ab0af843e41a/68747470733a2f2f706f7365722e707567782e6f72672f70696e766f6963652f7069706564726976652d7068702d6170692f646f776e6c6f6164732e737667)](https://packagist.org/packages/pinvoice/pipedrive-php-api) [![Latest Unstable Version](https://camo.githubusercontent.com/d40490ec76eaddc8893bc357b9bb18cbd1c2ba1720a4e41755bd3747e8c37f58/68747470733a2f2f706f7365722e707567782e6f72672f70696e766f6963652f7069706564726976652d7068702d6170692f762f756e737461626c652e737667)](https://packagist.org/packages/pinvoice/pipedrive-php-api) [![License](https://camo.githubusercontent.com/68f2b78f6f14cd8f16854c5017c8d880ccd81877b16812753b4ba6e8ef3da159/68747470733a2f2f706f7365722e707567782e6f72672f70696e766f6963652f7069706564726976652d7068702d6170692f6c6963656e73652e737667)](https://packagist.org/packages/pinvoice/pipedrive-php-api)

Status
------

[](#status)

APIImplementationDocumentation[Activities](https://developers.pipedrive.com/v1#methods-Activities)[X](#)[X](#)[Deals](https://developers.pipedrive.com/v1#methods-Deals)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/Deals.php)[√](https://github.com/Pinvoice/pipedrive-php-api#deals)[DealFields](https://developers.pipedrive.com/v1#methods-DealFields)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/DealFields.php)[√](https://github.com/Pinvoice/pipedrive-php-api#dealfields)[Email](https://developers.pipedrive.com/v1#methods-EmailMessages)[X](#)[X](#)[Files](https://developers.pipedrive.com/v1#methods-Files)[X](#)[X](#)[Notes](https://developers.pipedrive.com/v1#methods-Notes)[X](#)[X](#)[Organizations](https://developers.pipedrive.com/v1#methods-Organizations)[X](#)[X](#)[Persons](https://developers.pipedrive.com/v1#methods-Persons)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/Persons.php)[√](https://github.com/Pinvoice/pipedrive-php-api#persons)[PersonFields](https://developers.pipedrive.com/v1#methods-PersonFields)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/PersonFields.php)[√](https://github.com/Pinvoice/pipedrive-php-api#personfields)[Pipelines](https://developers.pipedrive.com/v1#methods-Pipelines)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/Pipelines.php)[√](https://github.com/Pinvoice/pipedrive-php-api#pipelines)[Products](https://developers.pipedrive.com/v1#methods-Products)[X](#)[X](#)[Stages](https://developers.pipedrive.com/v1#methods-Stages)[P](https://github.com/Pinvoice/pipedrive-php-api/blob/master/src/APIObjects/Stages.php)[√](https://github.com/Pinvoice/pipedrive-php-api#stages)Installation
------------

[](#installation)

Add the package as a dependency in your `composer.json` file:

```
require {
    "pinvoice/pipedrive-php-api": "dev-master"
}
```

Include the composer autoloader in your script. Set your Pipedrive API token and create an instance of the API.

```
require 'vendor/autoload.php';

use Pinvoice\Pipedrive\API as PipedriveAPI;

$pipedrive = new PipedriveAPI(getenv('PIPEDRIVE_TOKEN'));
```

Usage
-----

[](#usage)

### Deals

[](#deals)

```
// Get all deals
$pipedrive->deals->getDeals();

// Get all deals, with optional filters
$pipedrive->deals->getDeals(array(
  'filter_id' => 12,
  'start' => 3,
  'limit' => 1,
  'sort_by' => 'first_name',
  'sort_mode' => 'asc',
  'owned_by_you' => true
));

// Get deal by ID
$pipedrive->deals->getDeal(70);

// Find deals by name
$pipedrive->deals->getDealsByName(array(
	'term' => 'money'
));

// Find deals by name, with optional filters
$pipedrive->deals->getDealsByName(array(
	'term' => 'money',
	'person_id' => 1,
	'org_id' => 2
));
```

### DealFields

[](#dealfields)

```
// Get all deal fields
$dealfields = $pipedrive->dealfields->getDealFields();

// Get deal field object by key (from deal fields set)
$field = $pipedrive->dealfields->getDealFieldByKey('109204dc0283d5ced6c0438f8b7a220ecac9238d', $dealfields);

// Translate custom fields in Deal object(s), keys to text
// For example, this will replace $deal->109204dc0283d5ced6c0438f8b7a220ecac9238d with $deal->test
$deals = $pipedrive->deals->getDeals();

foreach ($deals as $deal) {
    $pipedrive->dealfields->translateDealFieldKeys($deal);
}
```

### Persons

[](#persons)

```
// Get all persons
$pipedrive->persons->getPersons();

// Get all persons, with optional filters
$pipedrive->persons->getPersons(array(
  'filter_id' => 12,
  'start' => 3,
  'limit' => 1,
  'sort_by' => 'first_name',
  'sort_mode' => 'asc'
));

// Get person by ID
$pipedrive->persons->getPerson(70);

// Find person by name
$pipedrive->persons->getPersonsByName(array(
  'term' => 'Junior'
));

// Find persons by name, with optional filters
$pipedrive->persons->getPersonsByName(array(
  'term' => 'Junior',
  'person_id' => 1,
  'org_id' => 2,
  'start' => 1,
  'limit' => 1,
  'search_by_email' => false
));
```

### PersonFields

[](#personfields)

```
// Get all person fields
$personfields = $pipedrive->personfields->getPersonFields();

// Get person field object by key (from person fields set)
$field = $pipedrive->personfields->getPersonFieldByKey('109204dc0283d5ced6c0438f8b7a220ecac9238d', $personfields);

// Translate custom fields in Person object(s), keys to text
// For example, this will replace $person->109204dc0283d5ced6c0438f8b7a220ecac9238d with $person->test
$persons = $pipedrive->persons->getPersons();

foreach ($persons as $person) {
    $pipedrive->personfields->translatePersonFieldKeys($person);
}
```

### Pipelines

[](#pipelines)

```
// Get all pipelines
$pipedrive->pipelines->getPipelines();

// Get pipeline by ID
$pipedrive->pipelines->getPipeline(1);
```

### Stages

[](#stages)

```
// Get all stages
$pipedrive->stages->getStages();

// Get stage by ID
$pipedrive->stages->getStage(70);

// Returns stages for provided pipeline
$pipedrive->stages->getStagesByPipelineId(1);
```

Testing
-------

[](#testing)

Put `PIPEDRIVE_TOKEN` in your environment. Or put the following in `phpunit.xml`.

```

```

Run tests with `phpunit (-v) tests`.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1312973?v=4)[Melvin](/maintainers/melvinsh)[@melvinsh](https://github.com/melvinsh)

---

Top Contributors

[![melvinsh](https://avatars.githubusercontent.com/u/1312973?v=4)](https://github.com/melvinsh "melvinsh (37 commits)")[![emesa-olivier](https://avatars.githubusercontent.com/u/9035122?v=4)](https://github.com/emesa-olivier "emesa-olivier (1 commits)")[![funyug](https://avatars.githubusercontent.com/u/8094201?v=4)](https://github.com/funyug "funyug (1 commits)")

### Embed Badge

![Health badge](/badges/pinvoice-pipedrive-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/pinvoice-pipedrive-php-api/health.svg)](https://phpackages.com/packages/pinvoice-pipedrive-php-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
