PHPackages                             picr/php-autopilothq - 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. picr/php-autopilothq

ActiveLibrary[API Development](/categories/api)

picr/php-autopilothq
====================

PHP wrapper for interacting with the AutopilotHQ API.

v0.1.5(7y ago)11147.3k↓35.7%21[2 issues](https://github.com/dekalee/php-autopilothq/issues)[4 PRs](https://github.com/dekalee/php-autopilothq/pulls)1MITPHPPHP &gt;=5.5.9

Since Feb 25Pushed 5y ago5 watchersCompare

[ Source](https://github.com/dekalee/php-autopilothq)[ Packagist](https://packagist.org/packages/picr/php-autopilothq)[ Docs](https://github.com/finicprint/php-autopilothq)[ RSS](/packages/picr-php-autopilothq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (1)

php-autopilothq
===============

[](#php-autopilothq)

A php library for interacting with AutopilotHQ API .

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

[](#installation)

```
$ composer require picr/php-autopilothq
```

Usage
-----

[](#usage)

---

All interaction occurs in the `AutopilotManager` class.

### initialize manager

[](#initialize-manager)

```
$manager = new AutopilotManager($apiKey);
```

### getContact

[](#getcontact)

```
$manager->getContact($id|$email);
```

### saveContact

[](#savecontact)

```
$manager->saveContact(AutopilotContact $contact);
```

### saveContacts

[](#savecontacts)

```
$manager->saveContacts(array $contacts);
```

### deleteContact

[](#deletecontact)

```
$manager->deleteContact($id|$email);
```

### unsubscribeContact

[](#unsubscribecontact)

```
$manager->unsubscribeContact($id|$email);
```

### subscribeContact

[](#subscribecontact)

```
$manager->subscribeContact($id|$email);
```

### updateContactEmail

[](#updatecontactemail)

```
$manager->updateContactEmail($oldEmail, $newEmail);
```

### getAllLists

[](#getalllists)

```
$manager->getAllLists();
```

### createList

[](#createlist)

```
$manager->createList($list);
```

### getListByName

[](#getlistbyname)

```
$manager->getListByName($list);
```

### deleteList

[](#deletelist)

```
//TODO: AutopilotHQ hasn't implemented this yet
$manager->deleteList($list);
```

### getAllContactsInList

[](#getallcontactsinlist)

```
$manager->getAllContactsInList($list);
```

### addContactToList

[](#addcontacttolist)

```
$manager->addContactToList($list, $id|$email);
```

### removeContactFromList

[](#removecontactfromlist)

```
$manager->removeContactFromList($list, $id|$email);
```

### checkContactInList

[](#checkcontactinlist)

```
$manager->checkContactInList($list, $id|$email);
```

### allTriggers

[](#alltriggers)

```
$manager->allTriggers();
```

### addContactToJourney

[](#addcontacttojourney)

```
$manager->addContactToJourney($journey, $id|$email);
```

### allRestHooks

[](#allresthooks)

```
$manager->allRestHooks();
```

### deleteAllRestHooks

[](#deleteallresthooks)

```
$manager->deleteAllRestHooks();
```

### addRestHook

[](#addresthook)

```
$manager->addRestHook($event, $targetUrl);
```

### deleteRestHook

[](#deleteresthook)

```
$manager->deleteRestHook($hookId);
```

AutopilotContact
----------------

[](#autopilotcontact)

---

### get value

[](#get-value)

```
// magic method
$value = $contact->$name;
// getter
$value = $contact->getFieldValue($name);
```

### set value

[](#set-value)

```
// magic method
$contact->$name = $value;
// setter
$contact->setFieldValue($name, $value);
```

### unset value

[](#unset-value)

```
// magic method
unset($contact->$name);
// method
$contact->unsetFieldValue($name);
```

### isset value

[](#isset-value)

```
// magic method
isset($contact->$name);
// method
$contact->issetFieldValue($name);
```

### getAllContactLists

[](#getallcontactlists)

```
//NOTE: this only reads cached "lists" array returned for a "contact info" request
$contact->getAllContactLists();
```

### hasList

[](#haslist)

```
//NOTE: this only reads cached "lists" array returned for a "contact info" request
$contact->hasList($list);
```

### fill

[](#fill)

```
// read array of values and populate properties
// NOTE: automatically formats attributes according to AutopilotHQ's "naming convention" (doesn't really exist)
$contact->fill([
    'firstName' => 'John',
    'lastName'  => 'Smith',
    'age'       => 42,
]);
```

### toRequest

[](#torequest)

```
// return array ready to be pushed to the API
$user = $contact->toRequest();
```

### toArray

[](#toarray)

```
// return array of [ property => value ] no matter if custom or defined field
$user = $contact->toArray();
/* [
 *    'firstName' => 'John',
 *    'lastName'  => 'Smith',
 *    'age'       => 42,
 * ]
 */
```

### jsonSerialize

[](#jsonserialize)

```
// json representation of "toArray()"
$user = $contact->jsonSerialze();
$user = json_encode($contact);
```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~275 days

Total

4

Last Release

2910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd5a2c6deedf2f52379d21fa55c9f5c6d0999b0ac1ca2ca2f33293e229107bfe?d=identicon)[iampersistent](/maintainers/iampersistent)

![](https://avatars.githubusercontent.com/u/2675545?v=4)[Nicolas Thal](/maintainers/nicolasThal)[@nicolasThal](https://github.com/nicolasThal)

![](https://www.gravatar.com/avatar/34a96ec79e60bfc56210559a1eedfddf3d4e4a26a6ab541dce0f7594e32fd63b?d=identicon)[ruskiyos](/maintainers/ruskiyos)

---

Top Contributors

[![nicolasThal](https://avatars.githubusercontent.com/u/2675545?v=4)](https://github.com/nicolasThal "nicolasThal (7 commits)")[![ruskiyos](https://avatars.githubusercontent.com/u/1847403?v=4)](https://github.com/ruskiyos "ruskiyos (3 commits)")[![BrianAltenhofel](https://avatars.githubusercontent.com/u/1105455?v=4)](https://github.com/BrianAltenhofel "BrianAltenhofel (2 commits)")[![pzaj2](https://avatars.githubusercontent.com/u/19946083?v=4)](https://github.com/pzaj2 "pzaj2 (1 commits)")[![rickard2](https://avatars.githubusercontent.com/u/488425?v=4)](https://github.com/rickard2 "rickard2 (1 commits)")

---

Tags

autopilotpicrautopilothq

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/picr-php-autopilothq/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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