PHPackages                             markuszeller/cleverreach - 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. markuszeller/cleverreach

ActiveLibrary

markuszeller/cleverreach
========================

CleverReach REST API v3 client

v0.0.1(7y ago)03271MITPHP

Since Apr 15Pushed 7y agoCompare

[ Source](https://github.com/markuszeller/cleverreach)[ Packagist](https://packagist.org/packages/markuszeller/cleverreach)[ Docs](https://github.com/markuszeller/cleverreach)[ RSS](/packages/markuszeller-cleverreach/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

CleverReach REST API v3 client
==============================

[](#cleverreach-rest-api-v3-client)

This library makes it easy to interact with the CleverReach REST API v3.

*Forked from . Moved to own namespace, because pull requests weren't merged nor any other reaction from author.*

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

[](#installation)

```
composer require markuszeller/cleverreach
```

Usage
-----

[](#usage)

**Get an access token**

```
use markuszeller\CleverReach\ApiManager;
use markuszeller\CleverReach\Http\Guzzle as HttpAdapter;

// Create an HTTP adapter
$httpAdapter = new HttpAdapter();

// Authorize your app by credentials
$response = $httpAdapter->authorize('', '');

if (isset($response['access_token'])) {
    // Persist the access token for later use...
}
```

**Initialize an API manager**

```
use markuszeller\CleverReach\ApiManager;
use markuszeller\CleverReach\Http\Guzzle as HttpAdapter;

// Create an HTTP adapter
$httpAdapter = new HttpAdapter(
    [
        'access_token' => '',
    ]
);

// Create the API manager
$apiManager = new ApiManager($httpAdapter);
```

**Create an inactive subscriber**

```
$response = $apiManager->createSubscriber(
    '',
    '',
    false, // not activated
    [
        'salutation' => 'Mr.',
        'firstname' => 'John',
        'lastname' => 'Doe',
    ]
);

if (isset($response['id'])) {
    // ...
}
```

**Trigger Double-Opt-In email for an inactive subscriber**

```
$response = $apiManager->triggerDoubleOptInEmail('', '');

if (isset($response['success'])) {
    // ...
}
```

**Trigger Double-Opt-Out email for an active subscriber**

```
$response = $apiManager->triggerDoubleOptOutEmail('', '');

if (isset($response['success'])) {
    // ...
}
```

**Get subscriber**

```
$response = $apiManager->getSubscriber('', '');

if (isset($response['id'])) {
    // ...
}
```

**Set active status of a subscriber**

```
$response = $apiManager->getSubscriber('', '', '');

if (true === $response) {
    // ...
}
```

**Delete subscriber**

```
$response = $apiManager->deleteSubscriber('', '');

if (true === $response) {
    // ...
}
```

**Examples for reading Mailings**

```
// Get a list of all Mailings
// You can provide a state, i.e. draft
$mailings = $apiManager->getMailings(0, ApiManager::MAILING_STATE_DRAFT);

// Get a specific Mailing
// returns a Mailing Object
$mailing = $apiManager->getMailing(MAILING_ID);

// Get Specific Mailing details
$mailingLinks = $apiManager->getMailingLinks(MAILING_ID);
$mailingOrders = $apiManager->getMailingOrders(MAILING_ID);
$mailingChannels = $apiManager->getMailingChannels();
$mailingChannel = $apiManager->getMailingChannel(CHANNEL_ID);
```

**Update a Mailing**

```
// Read one for updating
$mailing = $apiManager->getMailing(MAILING_ID);

// Create a fresh Mailing and Content instance with no data
$updatedMailing = new Mailing(MAILING_ID);
$content = new MailingContent();

// Get HTML content from "old"
$html = $mailingData->getContent()->getHtml();

// Inject a update message after body tag
$date = date(DATE_W3C);
$html = preg_replace("/()/", "\$1\nAutomated update at {$date}", $html);

// Place into Content entity and update Mailings content
$content->setHtml($html);
$updatedMailing->setContent($content);

// Update request (PUT)
$apiManager->updateMailing($updatedMailing);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a10b7f1f02a4c79241e1624d8cb19fcc112471cd561854307bb383dd4651fd4?d=identicon)[markuszeller](/maintainers/markuszeller)

---

Top Contributors

[![rdoepner](https://avatars.githubusercontent.com/u/13964038?v=4)](https://github.com/rdoepner "rdoepner (20 commits)")[![markuszeller](https://avatars.githubusercontent.com/u/71471?v=4)](https://github.com/markuszeller "markuszeller (13 commits)")[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (2 commits)")

---

Tags

REST APInewslettercleverreach

### Embed Badge

![Health badge](/badges/markuszeller-cleverreach/health.svg)

```
[![Health](https://phpackages.com/badges/markuszeller-cleverreach/health.svg)](https://phpackages.com/packages/markuszeller-cleverreach)
```

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[rdoepner/cleverreach

CleverReach REST API v3 client

34327.0k](/packages/rdoepner-cleverreach)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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