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

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

kylewlawrence/infinity-api-client-php
=====================================

Infinity API PHP SDK

v1.0.242(3y ago)016511MITPHPPHP &gt;=8.1

Since Jan 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/KyleWLawrence/infinity-api-client-php)[ Packagist](https://packagist.org/packages/kylewlawrence/infinity-api-client-php)[ Docs](http://designanddevelop.io)[ RSS](/packages/kylewlawrence-infinity-api-client-php/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (9)Versions (33)Used By (1)

Infinity API PHP SDK Client Library
===================================

[](#infinity-api-php-sdk-client-library)

API Client Version
------------------

[](#api-client-version)

This is the first version of a community sponsored PHP SDK client for Infinity API.

API version support
-------------------

[](#api-version-support)

This client **only** supports Infinity's API v2. Please see their [API documentation](https://startinfinity.com/help/1.0/integrations/api) for more information.

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

[](#requirements)

- PHP 8.1+

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

[](#installation)

The Infinity API PHP SDK client can be installed using [Composer](https://packagist.org/packages/kylewlawrence/infinity-api-client-php).

Are you using this with Laravel? If so, use the [Laravel wrapper](https://github.com/KyleWLawrence/infinity-laravel).

### Composer

[](#composer)

To install run `composer require kylewlawrence/infinity-api-client-php`

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

[](#configuration)

Configuration is done through an instance of `KyleWLawrence\Infinity\Api\HttpClient`. The block is mandatory and if not passed, an error will be thrown.

```
// load Composer
require 'vendor/autoload.php';

use KyleWLawrence\Infinity\Api\HttpClient as InfinityAPI;

$workspace = 1234; // replace this with your Infinity workspace ID
$bearer     = "6wiIBWbGkBMo1mRDMuVwkw1EPsNkeUj95PIz2akv"; // replace this with your Infinity Personal Access/Bearer token

$client = new InfinityAPI($workspace);
$client->setAuth('bearer', ['bearer' => $bearer]);
```

Usage
-----

[](#usage)

### Basic Operations

[](#basic-operations)

```
// Get all boards
$boards = $client->boards()->getAll();
print_r($boards);

// Create a new board
$newBoard = $client->boards()->create([
    'name' => 'Blah Blah',
    'description' => 'Bler bleman blope',
    'user_ids' => [1234, 1235, 12346],
]);
print_r($newBoard);

// Update an item
$client->boards('PWefUeHA8Pd')->items('364019f5-0198-407b-931a-4f8ea51ecc28')->update(',[
    'folder_id' => 'U7MjUC5jNpM'
]);

// Delete an item value
$client->boards('PWefUeHA8Pd')->items(''364019f5-0198-407b-931a-4f8ea51ecc28'')->values()->delete('8b9fee67-600c-499f-ab19-04bd9092be4e');

// Get all workspaces
$workspaces = $client->workspaces()->getAll();
print_r($workspaces);
```

Discovering Methods &amp; Classes
---------------------------------

[](#discovering-methods--classes)

```
// Get the base methods/classes available
$client->getValidSubResrouces()

// The above example will output something like:
[
    "boards" => "KyleWLawrence\Infinity\Api\Resources\Core\Boards",
    "profile" => "KyleWLawrence\Infinity\Api\Resources\Core\Profile",
    "attachments" => "KyleWLawrence\Infinity\Api\Resources\Core\Attachments",
    "users" => "KyleWLawrence\Infinity\Api\Resources\Core\Users",
    "workspaces" => "KyleWLawrence\Infinity\Api\Resources\Core\Workspaces",
]

// Most available subresources are on the boards class, accessible by:
$client->boards()->getValidSubResources()

// These are methods/classes that can be chained to the client. For instance:
// For instance, "boards" => "KyleWLawrence\Infinity\Api\Resources\Core\Boards", can be used as $client->boards()

// To find the chained methods available to the class, now do:
$client->boards()->getRoutes()

// The above example will output something like:
[
    "getAll" => "boards",
    "get" => "board/{id}",
    "create" => "boards",
]

// Those routes can be compared with the Infinity documentation routes and run as chained methods such as the below command to get all sites:
$client->boards()->getAll()
```

### Pagination

[](#pagination)

The Infinity API offers a way to get the next pages for the requests and is documented in [the Infinity Developer Documentation](https://s3.amazonaws.com/devdocs.startinfinity.com/index.html#items-GETapi-v2-workspaces--workspace--boards--board_id--items).

The way to do this is to pass it as an option to your request.

```
$boards = $this->client->boards('PWefUeHA8Pd')->items()->getAll(['after' => '8b9fee67-600c-499f-ab19-04bd9092be4e', 'sort_by' => 'created_at', 'limit' => 100]);
```

Some of the allowed options include

- sort\_by
- after
- before
- limit

### Retrying Requests

[](#retrying-requests)

Add the `RetryHandler` middleware on the `HandlerStack` of your `GuzzleHttp\Client` instance. By default `KyleWLawrence\Infinity\Api\HttpClient`retries:

- timeout requests
- those that throw `Psr\Http\Message\RequestInterface\ConnectException:class`
- and those that throw `Psr\Http\Message\RequestInterface\RequestException:class` that are identified as ssl issue.

#### Available options

[](#available-options)

Options are passed on `RetryHandler` as an array of values.

- max = 2 *limit of retries*
- interval = 300 *base delay between retries in milliseconds*
- max\_interval = 20000 *maximum delay value*
- backoff\_factor = 1 *backoff factor*
- exceptions = \[ConnectException::class\] *Exceptions to retry without checking retry\_if*
- retry\_if = null *callable function that can decide whether to retry the request or not*

Contributing
------------

[](#contributing)

Pull Requests are always welcome. I'll catch-up and develop the contribution guidelines soon. For the meantime, just open and issue or create a pull request.

Copyright and license
---------------------

[](#copyright-and-license)

Copyright 2023-present Infinity

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~10 days

Total

32

Last Release

1188d ago

### Community

Maintainers

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

---

Top Contributors

[![KyleWLawrence](https://avatars.githubusercontent.com/u/10180771?v=4)](https://github.com/KyleWLawrence "KyleWLawrence (96 commits)")

---

Tags

Guzzlephp-sdkinfinity

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[sylius/sylius

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

8.5k5.9M738](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[google/cloud

Google Cloud Client Library

1.2k16.7M57](/packages/google-cloud)

PHPackages © 2026

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