PHPackages                             programmatordev/php-api-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. programmatordev/php-api-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

programmatordev/php-api-sdk
===========================

A fluent PHP library for creating API SDKs with PSR-18, PSR-17, PSR-6 and PSR-3 support

v3.0.0(1w ago)110.2k2MITPHPPHP &gt;=8.1CI passing

Since Mar 15Pushed 1w agoCompare

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

READMEChangelog (9)Dependencies (39)Versions (13)Used By (2)

PHP API SDK
===========

[](#php-api-sdk)

[![Latest Version](https://camo.githubusercontent.com/a3e5c6fa4acb972150694a1c0a929f94c18aff14b77312a98a1f251fab398512/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f70726f6772616d6d61746f726465762f7068702d6170692d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/programmatordev/php-api-sdk/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Tests](https://github.com/programmatordev/php-api-sdk/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/programmatordev/php-api-sdk/actions/workflows/ci.yml?query=branch%3Amain)

These docs describe how to create API SDKs with this package.

This package is built for two developer audiences:

- SDK authors: developers creating concrete API SDKs with this library.
- SDK users: developers consuming those SDKs in applications.

The goal is to keep SDK authoring fluent and compact, keep SDK usage focused on real API resources, and still expose enough control for developers who need to customize or work around an SDK.

The practical guides below show how to build resources, map responses, and configure the HTTP pipeline. Read [Design Approach](docs/02-design-approach.md) for more about the reasoning behind the API shape.

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

[](#requirements)

- PHP `>=8.1`
- PSR-18 HTTP client support
- PSR-17 request and stream factory support

The package uses PHP-HTTP discovery for PSR-18 clients and PSR-17 factories. When the `php-http/discovery` Composer plugin is enabled, missing implementations can be installed automatically from the supported virtual packages.

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

[](#installation)

```
composer require programmatordev/php-api-sdk
```

SDK packages may still require or suggest concrete PSR-18 and PSR-17 implementations when they want tighter control over the default HTTP stack.

Guides
------

[](#guides)

- [Getting Started](docs/01-getting-started.md): create a small SDK with an API facade, resource, entity, and response mapping.
- [Design Approach](docs/02-design-approach.md): the reasoning behind fluent SDK authoring, clean SDK usage, and hackability.
- [API](docs/03-api.md): SDK facade setup methods, configuration, and extension points.
- [Resource Authoring](docs/04-resource-authoring.md): deeper guide for resource methods, query/header options, request bodies, entity mapping, collections, envelopes, and API-specific resource chains.
- [Resources](docs/05-resources.md): resource classes and endpoint request helpers.
- [Responses](docs/06-responses.md): decoded data, raw responses, entities, collections, envelopes, and context.
- [Authentication](docs/07-authentication.md): configure bearer, basic, header, query, HTTPlug, and custom authentication.
- [HTTP Client](docs/08-http-client.md): configure PSR-18 clients and PSR-17 factories.
- [Cache](docs/09-cache.md): configure PSR-6 HTTP response caching.
- [Logging](docs/10-logging.md): configure PSR-3 logging and HTTP/cache log output.
- [Plugins](docs/11-plugins.md): configure HTTPlug middleware and priority ordering.
- [Hooks](docs/12-hooks.md): run SDK-author callbacks around requests and responses.

Upgrading
---------

[](#upgrading)

See [Upgrade to 3.0](UPGRADE-3.0.md) for the high-level changes.

###  Health Score

50

↑

FairBetter than 95% of packages

Maintenance98

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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

Recently: every ~57 days

Total

12

Last Release

11d ago

Major Versions

v0.3.0 → v1.0.02024-05-28

v1.0.1 → v2.0.02025-10-12

v2.1.1 → 3.x-dev2026-06-21

### Community

Maintainers

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

---

Top Contributors

[![andrepimpao](https://avatars.githubusercontent.com/u/41913452?v=4)](https://github.com/andrepimpao "andrepimpao (185 commits)")

---

Tags

apiapi-clientapi-sdkhttp-clientphp-apiphp-sdkpsr-17psr-18psr-3psr-6sdkpsr-3apipsr-17sdkhttp clientpsr-18psr-6api clientphp-sdkPHP-APIapi-sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/programmatordev-php-api-sdk/health.svg)

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

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M316](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M734](/packages/sylius-sylius)

PHPackages © 2026

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