PHPackages                             santaklouse/hestiacp-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. santaklouse/hestiacp-api

ActiveLibrary[API Development](/categories/api)

santaklouse/hestiacp-api
========================

HestiaCP API SDK in PHP

06PHP

Since Apr 18Pushed 2y agoCompare

[ Source](https://github.com/santaklouse/HestiaCP-API)[ Packagist](https://packagist.org/packages/santaklouse/hestiacp-api)[ RSS](/packages/santaklouse-hestiacp-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

HestiaCP PHP API
================

[](#hestiacp-php-api)

How to use
----------

[](#how-to-use)

1. Installation

```
$ composer require santaklouse/hestiacp-api:dev-main
```

2. Create Client

Use API key, username and password is possible but highly discouraged as deemed unsafe and will be deprecated.

```
use HestiaCP\Client;
use HestiaCP\Authorization\Credentials;
use HestiaCP\Authorization\Host;

// You can choose to use an API Key or username and password (legacy)
$credentials = new Credentials('Key:Secret');
$port = 8083;
$host = new Host('https://server', $credentials, $port);
$client = new Client($host);
```

3. Usage

You can simply send one of prepared commands (or you can write your own command, just be sure to implement `HestiaCP\Command\ICommand` )

```
$command = new SomeCommand();

$response = $client->send($command);

echo $response->getResponseText();
```

List of prepared modules:

User

```
$userModule = $client->getModuleUser();

$userModule->list(); // returns all users with data

$userModule->detail('admin'); // returns selected user with data

$userModule->changePassword('admin', 'otherPa$$word');

$userModule->add('other_user', 'pa$$word', 'some@email.com');

$userModule->suspend('other_user');

$userModule->unsuspend('other_user');

$userModule->delete('other_user');
```

Web

```
$webModule = $client->getModuleWeb('admin'); // web module needs user

$webModule->listDomains();

$webModule->addDomain('domain.com');

$webModule->addDomainLetsEncrypt('domain.com', 'www.domain.com'); // needs longer timeout

$webModule->deleteDomainLetsEncrypt('domain.com');

$webModule->addDomainFtp('domain.com', 'test', 'pa$$word');

$webModule->changeDomainFtpPassword('domain.com', 'admin_test', 'otherPa$$word');

$webModule->changeDomainFtpPath('domain.com', 'admin_test', 'path/other');

$webModule->deleteDomainFtp('domain.com', 'admin_test');

$webModule->suspendDomain('domain.com');

$webModule->unsuspendDomain('domain.com');

$webModule->deleteDomain('domain.com');
```

Mail

```
$mailModule = $client->getModuleMail('admin'); // mail module needs user

$mailModule->listDomains(); // returns mail domains from selected user

$mailModule->addDomain('domain.com'); // add domain

$mailModule->listAccounts('domain.com'); // returns accounts from selected user and domain

$mailModule->listDomainDkim('domain.com');

$mailModule->listDomainDkimDns('domain.com');

$mailModule->addAccount('domain.com', 'info', 'pa$$word'); // add info@domain.com account

$mailModule->changeAccountPassword('domain.com', 'info', 'otherPa$$word'); // change info@domain.com password

$mailModule->suspendAccount('domain.com', 'info'); // suspend info@domain.com account

$mailModule->unsuspendAccount('domain.com', 'info'); // unsuspend info@domain.com account

$mailModule->deleteAccount('domain.com', 'info');

$mailModule->suspendDomain('domain.com');

$mailModule->unsuspendDomain('domain.com');

$mailModule->deleteDomain('domain.com');
```

DB

```
$dbModule = $client->getModuleDatabase('admin');

$dbModule->add('database', 'dbuser', 'dbpass');

$dbModule->delete('admin_database');

$dbModule->deleteDatabases();

$dbModule->listDatabase('database');

$dbModule->listDatabases();
```

Backups

```
$backupModule = $client->getModuleBackup('admin'); // backup module needs user

$backupModule->backup(); // create a new backup

$backupModule->delete('admin.2021-10-13_18-12-53.tar'); // delete an user backup

$backupModule->deleteExclusions(); // delete all backup exclusions

$backupModule->listBackups(); // returns the backups list

$backupModule->listBackup('admin.2021-10-13_18-12-53.tar'); // returns backup parameters list

$backupModule->listBackupExclusions(); // returns the backup exclusions list
```

DNS

```
$dnsModule = $client->getModuleDNS();
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b5ae5544c7e40e4355a229a73196db631b70ac64f592efabac7580a82a276bb?d=identicon)[santaklouse](/maintainers/santaklouse)

---

Top Contributors

[![ponasromas](https://avatars.githubusercontent.com/u/14789964?v=4)](https://github.com/ponasromas "ponasromas (51 commits)")[![neto737](https://avatars.githubusercontent.com/u/2430438?v=4)](https://github.com/neto737 "neto737 (41 commits)")[![santaklouse](https://avatars.githubusercontent.com/u/1434629?v=4)](https://github.com/santaklouse "santaklouse (3 commits)")

### Embed Badge

![Health badge](/badges/santaklouse-hestiacp-api/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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