PHPackages                             gosuccess/enhance-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. gosuccess/enhance-api

ActiveLibrary[API Development](/categories/api)

gosuccess/enhance-api
=====================

Modern PHP API client for the Enhance control panel API with PHP 8.4 features

v2.0.0(yesterday)00MITPHPPHP &gt;=8.4CI passing

Since Aug 27Pushed yesterdayCompare

[ Source](https://github.com/GoSuccessHQ/enhance-api)[ Packagist](https://packagist.org/packages/gosuccess/enhance-api)[ Docs](https://github.com/GoSuccessHQ/enhance-api)[ RSS](/packages/gosuccess-enhance-api/feed)WikiDiscussions main Synced today

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

Enhance API
===========

[](#enhance-api)

A modern, dependency-free PHP client for the [Enhance](https://enhance.com) control panel API.

- **Vanilla** – zero runtime dependencies, only the `curl` and `json` extensions.
- **Complete** – all 470 operations across 33 resources, covering the full Enhance API (v12.23.0).
- **Type-safe** – typed DTOs, enums, and resource methods built on PHP 8.4 features (property hooks, `readonly`, backed enums).

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

[](#requirements)

- PHP 8.4 or higher
- `ext-curl`, `ext-json`

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

[](#installation)

```
composer require gosuccess/enhance-api
```

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

[](#quick-start)

```
use GoSuccess\Enhance\Enhance;

$enhance = Enhance::create(
    host: 'https://cp.example.com/api',
    orgId: 'your-organization-uuid',
    accessToken: 'your-access-token',
);

// Read the API version
echo $enhance->install->orchdVersion();

// List the organization's plans (uses the configured organization id)
$plans = $enhance->plans->getPlans();
```

Every API section is exposed as a resource on the `Enhance` object, e.g. `$enhance->websites`, `$enhance->servers`, `$enhance->orgs`, `$enhance->plans`, `$enhance->subscriptions`, `$enhance->domains`, `$enhance->dns`, `$enhance->emails`, `$enhance->backups`, `$enhance->ssl`, and so on.

Documentation &amp; examples
----------------------------

[](#documentation--examples)

- **[docs/](docs/README.md)** – one reference page per resource, listing every method with its route, parameters, and a usage example.
- **[examples/](examples/README.md)** – runnable scripts (account overview, error handling, a full create/read/delete lifecycle).

Working with DTOs
-----------------

[](#working-with-dtos)

Request bodies are typed DTOs; only the properties you set are sent. Responses are hydrated into DTOs automatically.

```
use GoSuccess\Enhance\DTO\NewWebsite;
use GoSuccess\Enhance\Enum\PhpVersion;
use GoSuccess\Enhance\Enum\WebsiteKind;

$website = new NewWebsite();
$website->domain = 'example.test';
$website->phpVersion = PhpVersion::Php84;

$created = $enhance->websites->createWebsite($website, WebsiteKind::Normal);

echo $created->id; // NewResourceUuid::$id
```

By default, properties left as `null` are omitted from the request body. To clear a field via an update endpoint, mark it with `setNull()` so it is sent as an explicit `null`:

```
$update = new UpdateWebsite();
$update->setNull('phpVersion');

$enhance->websites->updateWebsite($update, $websiteId);
```

### The organization id

[](#the-organization-id)

Most endpoints are scoped to an organization. The `orgId` you pass to `Enhance::create()` is used by default, so you can omit it. Pass it explicitly to target a different organization (e.g. as an MO managing customers):

```
$enhance->websites->getWebsites();                        // configured organization
$enhance->websites->getWebsites(orgId: 'other-org-uuid'); // another organization
```

Pagination
----------

[](#pagination)

Listing endpoints accept `offset`/`limit`. `Paginator::items()` transparently walks every page for you:

```
use GoSuccess\Enhance\Util\Paginator;

foreach (Paginator::items(
    fn (int $offset, int $limit) => $enhance->websites->getWebsites(offset: $offset, limit: $limit),
) as $website) {
    echo $website->id . "\n";
}
```

Configuration
-------------

[](#configuration)

`Enhance::create()` covers the common case. For finer control, build a `Configuration` and pass it to the constructor:

```
use GoSuccess\Enhance\Enhance;
use GoSuccess\Enhance\Client\Configuration;

$config = new Configuration('https://cp.example.com/api', 'org-uuid', 'access-token');
$config->timeout = 60;     // request timeout in seconds (default 30)
$config->maxRetries = 3;   // retries for transient failures (default 2)
$config->verifySsl = true; // TLS verification (enabled by default)

$enhance = new Enhance($config);
```

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

[](#error-handling)

Non-2xx responses throw a typed exception. All of them extend `GoSuccess\Enhance\Exception\ApiException`, which carries the status code and response body as context.

```
use GoSuccess\Enhance\Exception\ApiException;
use GoSuccess\Enhance\Exception\NotFoundException;

try {
    $plan = $enhance->plans->getPlan(123);
} catch (NotFoundException $e) {
    // 404
} catch (ApiException $e) {
    echo $e->getMessage();
    $context = $e->getContext(); // ['status' => int, 'body' => mixed]
}
```

StatusException400`BadRequestException`401`UnauthorizedException`403`ForbiddenException`404`NotFoundException`409`ConflictException`429`RateLimitException`5xx`ServerException`transport error`RequestException`Custom HTTP client
------------------

[](#custom-http-client)

The client talks to the API through `GoSuccess\Enhance\Contract\HttpClientInterface`. The default implementation (`ApiClient`) uses cURL, but you can inject your own — useful for testing or custom transports:

```
$enhance = new Enhance($config, $myHttpClient);
```

Architecture
------------

[](#architecture)

```
src/
  Enhance.php          Entry point, one resource per API section
  Client/              Configuration and the cURL ApiClient
  Contract/            HttpClientInterface
  Http/                Immutable Response
  Resource/            33 resources (470 methods)
  DTO/                 360 hydratable data transfer objects
  Enum/                66 enums + HttpMethod/HttpStatusCode
  Exception/           Typed exception hierarchy
  Base/                AbstractResource, AbstractDto
  Attribute/           ArrayItemType

```

Development
-----------

[](#development)

The `Resource`, `DTO`, and `Enum` classes were originally derived from the Enhance OpenAPI specification (v12.23.0) and are now maintained by hand.

```
composer cs:fix       # apply coding standards
composer analyse      # PHPStan
composer test         # PHPUnit
composer check        # all of the above
```

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~664 days

Total

2

Last Release

1d ago

Major Versions

v1.0.0 → v2.0.02026-06-22

### Community

Maintainers

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

---

Top Contributors

[![PaulGossen](https://avatars.githubusercontent.com/u/29425389?v=4)](https://github.com/PaulGossen "PaulGossen (20 commits)")

---

Tags

apiclientphp84hostingcontrol panelenhanceenhance.com

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gosuccess-enhance-api/health.svg)

```
[![Health](https://phpackages.com/badges/gosuccess-enhance-api/health.svg)](https://phpackages.com/packages/gosuccess-enhance-api)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

46784.5k5](/packages/deepseek-php-deepseek-php-client)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.6k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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