PHPackages                             bandagroep/peepl-php - 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. bandagroep/peepl-php

ActiveLibrary

bandagroep/peepl-php
====================

PHP client library for the Peepl CRM API

01↓100%PHP

Since Mar 19Pushed 1mo agoCompare

[ Source](https://github.com/bandagroep/peepl-php)[ Packagist](https://packagist.org/packages/bandagroep/peepl-php)[ RSS](/packages/bandagroep-peepl-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

peepl-php
=========

[](#peepl-php)

PHP client library for the [Peepl CRM API](https://www.peepl.io/en/apidocs/).

Requirements
------------

[](#requirements)

- PHP 7.4 or 8.x
- ext-curl
- ext-json

Installation
------------

[](#installation)

```
composer require bandagroep/peepl-php
```

Quick start
-----------

[](#quick-start)

```
use Peepl\PeeplClient;

$peepl = new PeeplClient('YOUR_API_TOKEN');

// List contacts (paginated)
$page = $peepl->contacts->list();
foreach ($page->results as $contact) {
    echo $contact['first_name'] . ' ' . $contact['last_name'] . PHP_EOL;
}

// Fetch a single contact
$contact = $peepl->contacts->get(1);

// Create a contact
$result = $peepl->contacts->create([
    'first_name'         => 'Jan',
    'last_name'          => 'De Smet',
    'birth_date'         => '1990-05-15',
    'birth_place'        => 'Gent',
    'preferred_language' => 'nl',
    'gender'             => 'M',
    'email'              => 'jan@example.be',
]);
echo $result['id']; // new contact ID
```

Authentication
--------------

[](#authentication)

1. Log in to Peepl with administrator permissions.
2. Go to **Settings → API** and generate a token.
3. Pass the token to `PeeplClient`.

> ⚠️ The full token is only shown **once**. Store it safely (e.g. in an `.env` file).

Resources
---------

[](#resources)

### Contacts

[](#contacts)

```
$peepl->contacts->list(offset: 0, limit: 10);   // PeeplPaginatedResult
$peepl->contacts->get(int $id);
$peepl->contacts->create(array $data);
$peepl->contacts->update(int $id, array $data);
$peepl->contacts->search(['operator' => 'AND', 'last_name' => 'Doe']);
$peepl->contacts->segment(int $segmentId);
$peepl->contacts->customFields();
$peepl->contacts->customFieldCategories();
$peepl->contacts->positions(int $contactId);

// Addresses
$peepl->contacts->listAddresses(int $contactId);
$peepl->contacts->createAddress(int $contactId, array $data);
$peepl->contacts->updateAddress(int $contactId, int $addressId, array $data);
$peepl->contacts->deleteAddress(int $contactId, int $addressId);

// Secondary email addresses
$peepl->contacts->createEmailAddress(int $contactId, array $data);
$peepl->contacts->updateEmailAddress(int $contactId, int $emailId, array $data);
$peepl->contacts->deleteEmailAddress(int $contactId, int $emailId);

// Educations
$peepl->contacts->createEducation(int $contactId, array $data);
$peepl->contacts->updateEducation(int $contactId, int $educationId, array $data);
$peepl->contacts->deleteEducation(int $contactId, int $educationId);

// Company positions
$peepl->contacts->createCompanyPosition(int $contactId, array $data);
$peepl->contacts->updateCompanyPosition(int $contactId, int $positionId, array $data);
$peepl->contacts->deleteCompanyPosition(int $contactId, int $positionId);

// Custom field values
$peepl->contacts->createCustomFieldValue(int $contactId, array $data);
$peepl->contacts->updateCustomFieldValue(int $contactId, int $valueId, array $data);
```

### Organisations

[](#organisations)

Mirror of the Contacts resource, accessible via `$peepl->organisations`.

### Groups

[](#groups)

```
$peepl->groups->list();
$peepl->groups->members(int $groupId, 'contacts'|'organisations');
$peepl->groups->membersOnDate(int $groupId, 'contacts'|'organisations', 'yyyymmdd');
```

### Functions

[](#functions)

```
$peepl->functions->list();
$peepl->functions->members(int $functionId, 'contacts'|'organisations');
$peepl->functions->membersOnDate(int $functionId, 'contacts'|'organisations', 'yyyymmdd');
```

### Combinations

[](#combinations)

```
$peepl->combinations->list();
$peepl->combinations->byGroup(int $groupId);
$peepl->combinations->byFunction(int $functionId);
$peepl->combinations->members(int $combinationId, 'contacts'|'organisations');
$peepl->combinations->membersOnDate(int $combinationId, 'contacts'|'organisations', 'yyyymmdd');
```

### Address Types

[](#address-types)

```
$peepl->addressTypes->list();
$peepl->addressTypes->create(string $description, int $maxAmount);
$peepl->addressTypes->update(int $id, string $description, int $maxAmount);
$peepl->addressTypes->delete(int $id);
```

### Activities

[](#activities)

```
$peepl->activities->list();
$peepl->activities->createInternal(array $data);
$peepl->activities->createExternal(array $data);
```

Pagination
----------

[](#pagination)

Paginated endpoints return a `PeeplPaginatedResult` object:

```
$page = $peepl->contacts->list(offset: 0);

echo $page->count;         // total number of results
$page->results;            // array of items on this page
$page->hasNextPage();      // bool
$page->hasPreviousPage();  // bool

// Loop through all pages
$offset = 0;
do {
    $page = $peepl->contacts->list($offset);
    foreach ($page->results as $contact) {
        // process...
    }
    $offset += 10;
} while ($page->hasNextPage());
```

> The API caps `limit` at **10** and allows up to **100 requests per minute**.

Error handling
--------------

[](#error-handling)

```
use Peepl\PeeplException;

try {
    $contact = $peepl->contacts->get(99999);
} catch (PeeplException $e) {
    echo $e->getHttpStatus();   // e.g. 404
    echo $e->getMessage();      // e.g. "Not Found"
    print_r($e->getResponseBody());
}
```

Self-hosted / staging
---------------------

[](#self-hosted--staging)

```
$peepl = new PeeplClient('YOUR_TOKEN', 'https://your-own-peepl.example.com/v1/admin');
```

Running tests
-------------

[](#running-tests)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance63

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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://www.gravatar.com/avatar/b85703dd94166ca182a72e1389aedbf117fb2c5d2b8ca31b9c486bcfaa4007f0?d=identicon)[bandagroep](/maintainers/bandagroep)

---

Top Contributors

[![bandagroep](https://avatars.githubusercontent.com/u/269575045?v=4)](https://github.com/bandagroep "bandagroep (2 commits)")

### Embed Badge

![Health badge](/badges/bandagroep-peepl-php/health.svg)

```
[![Health](https://phpackages.com/badges/bandagroep-peepl-php/health.svg)](https://phpackages.com/packages/bandagroep-peepl-php)
```

PHPackages © 2026

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