PHPackages                             basekit/php-api-client - 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. basekit/php-api-client

ActiveLibrary[API Development](/categories/api)

basekit/php-api-client
======================

BaseKit PHP API client.

4.0.0(2y ago)34.3k3[2 issues](https://github.com/basekit/php-api-client/issues)1MITPHP

Since Nov 4Pushed 2y ago24 watchersCompare

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

READMEChangelog (3)Dependencies (6)Versions (11)Used By (1)

BaseKit REST API Client
=======================

[](#basekit-rest-api-client)

A PHP client for [BaseKit](http://basekit.com/)'s REST API. This client will provide documentation of the services available from the BaseKit API, describing URIs, HTTP methods and input parameters.

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

[](#installation)

The recommended way of including this package in your project is by using Composer. Add it to the `require` section of your project's `composer.json`.

```
composer require basekit/php-api-client
```

Usage
-----

[](#usage)

```
use BaseKit\Api\AuthType;
use BaseKit\Api\ClientFactory;

$client = ClientFactory::create(
    [
        'base_uri' => 'http://api.testing.com',
        'username' => 'foo',
        'password' => 'bar',
    ],
    AuthType::BASIC, // defaults to basic auth
);

$createSite = $client->getCommand(
    'CreateSite',
    [
        'accountHolderRef' => 123,
        'brandRef' => 789,
        'domain' => 'test.example.org',
    ]
);

$client->execute($createSite);
```

A more detailed example script is [available here](https://github.com/basekit/php-api-client-example) including account and site creation and populating a site with content using the API.

Testing
-------

[](#testing)

Feed an optional `handler` into the config of `clientFactory` to control the responses from the http client.

```
use BaseKit\Api\ClientFactory;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Psr7\Response;

$client = ClientFactory::create([
    'base_uri' => 'https://api.testing.com',
    'username' => 'foo',
    'password' => 'bar',
    'handler' => HandlerStack::create(
        new MockHandler([
            new Response(404, [], '"Hello, World! This is a test response."'),
        ])
    ) ,
]);

$createSite = $client->getCommand(
    'CreateSite',
    [
        'accountHolderRef' => 123,
        'brandRef' => 789,
        'domain' => 'test.example.org',
    ]
);

$client->execute($createSite); // Throws a 404 CommandClientException
```

License
-------

[](#license)

This software is released under the [MIT License](http://www.opensource.org/licenses/MIT).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~30 days

Total

10

Last Release

1055d ago

Major Versions

1.0.0 → 2.0.02015-02-05

1.2.1 → 3.0.02023-02-27

3.0.3 → 4.0.02023-06-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/110251?v=4)[Rob Mills](/maintainers/robjmills)[@robjmills](https://github.com/robjmills)

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

![](https://www.gravatar.com/avatar/1a7c83234e38e2e36bfd7c8decb2653f93a89fb09478e93ae04a54a3fd5e4288?d=identicon)[basekit](/maintainers/basekit)

---

Top Contributors

[![RhydianJenkins](https://avatars.githubusercontent.com/u/9198690?v=4)](https://github.com/RhydianJenkins "RhydianJenkins (5 commits)")[![robjmills](https://avatars.githubusercontent.com/u/110251?v=4)](https://github.com/robjmills "robjmills (3 commits)")[![markjeffries](https://avatars.githubusercontent.com/u/9568499?v=4)](https://github.com/markjeffries "markjeffries (2 commits)")[![megan-basekit](https://avatars.githubusercontent.com/u/3787381?v=4)](https://github.com/megan-basekit "megan-basekit (2 commits)")[![meganabigaildavidson](https://avatars.githubusercontent.com/u/1450799?v=4)](https://github.com/meganabigaildavidson "meganabigaildavidson (1 commits)")[![mvdgeijn](https://avatars.githubusercontent.com/u/50988060?v=4)](https://github.com/mvdgeijn "mvdgeijn (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/basekit-php-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/basekit-php-api-client/health.svg)](https://phpackages.com/packages/basekit-php-api-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[shopifyextras/shopify-php-api-wrapper

Shopify PHP (Guzzle) API Wrapper

11922.2k](/packages/shopifyextras-shopify-php-api-wrapper)[erlangb/betfair

Betfair API PHP 5.4+ library

471.6k](/packages/erlangb-betfair)

PHPackages © 2026

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