PHPackages                             drewm/drip - 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. drewm/drip

ActiveLibrary[API Development](/categories/api)

drewm/drip
==========

PHP library for interacting with the Drip API

v0.9(7y ago)19123.2k↓16.1%51MITPHPPHP &gt;=5.4

Since Jul 1Pushed 7y ago2 watchersCompare

[ Source](https://github.com/drewm/drip)[ Packagist](https://packagist.org/packages/drewm/drip)[ RSS](/packages/drewm-drip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (10)Used By (1)

Drip
====

[](#drip)

PHP library for making token-based API requests against Drip.

[![Build Status](https://camo.githubusercontent.com/ee612b066cbdf74b2d09d6d34e54082d7beecc998eb585dbea2372e4d5c0a40a/68747470733a2f2f7472617669732d63692e6f72672f647265776d2f647269702e737667)](https://travis-ci.org/drewm/drip)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7cb3877fc507d72a8030aefc181af96577a83edb1ebceecf55d0447bdc6b9d05/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f647265776d2f647269702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/drewm/drip/?branch=master)

Install
-------

[](#install)

Either download and include, or install via Composer:

```
composer require drewm/drip

```

Make a simple request
---------------------

[](#make-a-simple-request)

Create a new Drip object with

1. Your user's API token (Settings &gt; My User Settings &gt; API Token)
2. Your numeric account ID (Log into the Drip dashboard and it's the first segment in your URL)

```
use DrewM\Drip\Drip;
use DrewM\Drip\Dataset;

$Drip = new Drip('abc123', '1234567')
```

Create a new subscriber:

```
$data = new Dataset('subscribers', [
				'email' => 'postmaster@example.com',
			]);
$Response = $Drip->post('subscribers', $data);
```

List all subscribers:

```
$Response = $Drip->get('subscribers');
```

To request a method without an account ID in the URL, (e.g. list accounts) :

```
$Drip = new Drip('abc123');
$Response = $Drip->getGlobal('accounts');
```

To then subsequently set an account ID:

```
$Drip->setAccountID('1234567');
```

Handling responses
------------------

[](#handling-responses)

Methods return a Response object

```
if ($Response->status == 200) {
	// all is ok!
	$subscribers = $Response->subscribers;
} else {
	echo $Response->error;
	echo $Response->message;
}
```

Get the raw response:

```
$raw = $Response->get();
```

Webhooks
--------

[](#webhooks)

You can listen for webhooks in a couple of ways. The most basic is:

```
use DrewM\Drip\Drip;
$data = Drip::receiveWebhook();
```

If you prefer a pub/sub model, you can register listener callables:

```
use DrewM\Drip\Drip;

Drip::subscribeToWebhook('subscriber.created', function($data){
	// A subscriber was created
});

Drip::subscribeToWebhook('subscriber.subscribed_to_campaign', function($data){
	// A subscriber was added to a campaign
});
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

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

Every ~163 days

Recently: every ~326 days

Total

9

Last Release

2665d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/818b5806bb09c97b6150c8756c6abe0afd16c79097c0396a26687d88cc28638d?d=identicon)[drewm](/maintainers/drewm)

---

Top Contributors

[![drewm](https://avatars.githubusercontent.com/u/225402?v=4)](https://github.com/drewm "drewm (48 commits)")[![slaFFik](https://avatars.githubusercontent.com/u/282234?v=4)](https://github.com/slaFFik "slaFFik (8 commits)")

---

Tags

dripphp-librarywebhookdrip

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drewm-drip/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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