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

ActiveLibrary

neto737/hestiacp-api
====================

HestiaCP API SDK written in PHP

v1.2.0(4y ago)9997[1 issues](https://github.com/neto737/HestiaCP-API/issues)MITPHPPHP &gt;=7.3

Since Jun 30Pushed 3y ago3 watchersCompare

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

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

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

[](#hestiacp-php-api)

[![Name](https://camo.githubusercontent.com/b1f932aecc3913b529901f4638f93e25b66737c6b0f0cec0dd0af79690d4fd4d/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f6e616d652f6e65746f3733372f68657374696163702d617069)](//packagist.org/packages/neto737/hestiacp-api) [![Latest Stable Version](https://camo.githubusercontent.com/6196bab2261e5587bddafac726784308b1c67f9c20f98f86daf461d537eae3d3/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f6e65746f3733372f68657374696163702d6170692f6c6174657374)](https://packagist.org/packages/neto737/hestiacp-api) [![Total Downloads](https://camo.githubusercontent.com/62b1e9af1beaedba4ac3e2abee38799a5d2410488e9a9e0aa6890601f6c047a8/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f6e65746f3733372f68657374696163702d617069)](https://packagist.org/packages/neto737/hestiacp-api) [![License](https://camo.githubusercontent.com/49de00f4ce1f2822618244459dec4c08cec2989be728188de34f081a831ecff2/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f6c6963656e73652f6e65746f3733372f68657374696163702d617069)](https://packagist.org/packages/neto737/hestiacp-api) [![Build Status](https://camo.githubusercontent.com/3bf035f337bef7c723deccfbd5e5fcb5b8d92ab184b79a6fcf57bf6788fae45a/68747470733a2f2f7777772e7472617669732d63692e636f6d2f6e65746f3733372f48657374696143502d4150492e7376673f6272616e63683d6d61696e)](https://www.travis-ci.com/github/neto737/HestiaCP-API) [![codecov](https://camo.githubusercontent.com/9c095892426f81bad9843a389b2e491e44910b9f9dcb3585f217c6f32fb5fa54/68747470733a2f2f636f6465636f762e696f2f67682f6e65746f3733372f48657374696143502d4150492f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d46393349354a51585936)](https://codecov.io/gh/neto737/HestiaCP-API)

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

[](#how-to-use)

1. Installation

```
$ composer require neto737/hestiacp-api
```

2. Create Client

a) Easy way

```
use neto737\HestiaCP\Client;

// Easy way to create Client

// Using API Key
$client = Client::simpleFactory('https://someHost', 'API_Key');

// Using username and password
$client = Client::simpleFactory('https://someHost', 'someUser', 'somePass');
```

b) For some reasons (more hosts, etc) you may need create objects alone

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

// You can choose to use an API Key or username and password

// API Key
$credentials = new Credentials('API_Key');

// Username and Password
$credentials = new Credentials('someUser', 'somePassword');

$host = new Host('https://someHost', $credentials);

$client = new Client($host);
```

3. Usage

```
// verify login
$client->testAuthorization(); // bool
```

You can simply send one of prepared commands (or you can write own command - must implements `\neto737\HestiaCP\Command\ICommand` )

```
$command = new SomeCommand();

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

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

Or you can use prepared modules

a) user module

```
$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');
```

b) web module

```
$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');
```

c) mail module

```
$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');
```

d) db module

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

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

$dbModule->delete('admin_database');

$dbModule->deleteDatabases();

$dbModule->listDatabase('database');

$dbModule->listDatabases();

// todo

// ... etc
```

e) cron module

```
$cronModule = $client->getModuleCron();

// todo

// ... etc
```

f) backup module

```
$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
```

Donate ❤️
---------

[](#donate-heart)

```
BTC: bc1q89ntljt5lk7g9z68f5cjs83qfm2xme7g4hkur7
ETH: 0xeef9220639F14E7A0FD825AAAd0574e5a8aD7A4B
LTC: ltc1q508qfkd09vyya6c5zkfx4r248pf3ezj9ngjdr2

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

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 ~35 days

Total

4

Last Release

1669d ago

### Community

Maintainers

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

---

Top Contributors

[![neto737](https://avatars.githubusercontent.com/u/2430438?v=4)](https://github.com/neto737 "neto737 (41 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

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