PHPackages                             foundryco/boostr - 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. foundryco/boostr

ActiveLibrary[API Development](/categories/api)

foundryco/boostr
================

PHP client library for the Boostr API

v0.4(4mo ago)060MITPHPPHP ^8.1

Since Dec 16Pushed 3w agoCompare

[ Source](https://github.com/foundry-co/php-boostr-client)[ Packagist](https://packagist.org/packages/foundryco/boostr)[ RSS](/packages/foundryco-boostr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (9)Used By (0)

Boostr API PHP Client
=====================

[](#boostr-api-php-client)

A PHP client library for the Boostr API.

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

[](#requirements)

- PHP 8.1+
- Guzzle HTTP client

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

[](#installation)

```
composer require foundryco/boostr
```

Basic Usage
-----------

[](#basic-usage)

```
use FoundryCo\Boostr\BoostrClient;

$client = new BoostrClient();

// Authenticate with email and password
$client->authenticate('user@example.com', 'password');

// Or set an existing token directly
$client->setToken('your-jwt-token');

// Fetch resources
$deals = $client->deals()->all();
$deal = $client->deals()->find(123);
```

Authentication
--------------

[](#authentication)

The Boostr API uses JWT token authentication. You can authenticate using your email and password:

```
$client = new BoostrClient();
$client->authenticate('user@example.com', 'password');

// Check if authenticated
if ($client->isAuthenticated()) {
    // Make API calls
}
```

Or if you already have a token:

```
$client->setToken('existing-jwt-token');
```

Querying Resources
------------------

[](#querying-resources)

### Basic Queries

[](#basic-queries)

```
// Get all deals (returns first page)
$deals = $client->deals()->all();

// Get a single deal by ID
$deal = $client->deals()->find(123);

// Pass query parameters
$deals = $client->deals()->all(['page' => 2]);
```

### Default Filter Behavior

[](#default-filter-behavior)

By default, all queries include `filter=all` which returns all records accessible to your account. Without this filter, the API only returns records owned by the authenticated user.

```
// Default: returns all company records (filter=all)
$deals = $client->deals()->all();

// Override to get only your records
$deals = $client->deals()->all(['filter' => 'mine']);
```

### Using QueryBuilder

[](#using-querybuilder)

The QueryBuilder provides a fluent interface for building queries:

```
use FoundryCo\Boostr\Support\QueryBuilder;

$query = QueryBuilder::make()
    ->page(2)
    ->createdAfter('2023-01-01')
    ->createdBefore('2023-12-31')
    ->updatedAfter('2023-06-01')
    ->filterMine();  // Override default filter=all

$deals = $client->deals()->all($query);
```

#### Available QueryBuilder Methods

[](#available-querybuilder-methods)

- `page(int $page)` - Set page number
- `filter(string $filter)` - Set filter scope ('all', 'mine', etc.)
- `filterAll()` - Shortcut for `filter('all')` (default behavior)
- `filterMine()` - Shortcut for `filter('mine')` - only your records
- `createdAfter(string|DateTimeInterface $date)` - Filter by created\_at &gt;= date
- `createdBefore(string|DateTimeInterface $date)` - Filter by created\_at &lt;= date
- `updatedAfter(string|DateTimeInterface $date)` - Filter by updated\_at &gt;= date
- `updatedBefore(string|DateTimeInterface $date)` - Filter by updated\_at &lt;= date
- `where(string $key, mixed $value)` - Add custom filter parameter

Pagination
----------

[](#pagination)

The Boostr API uses fixed page sizes that vary by endpoint (typically 10-20 items per page). The API does not support custom page sizes.

### Single Page

[](#single-page)

```
$response = $client->deals()->all();

// Get the data
$data = $response->getData();
$data = $response->toArray();

// Pagination info
$page = $response->getPage();
$hasNext = $response->hasNextPage();
$hasPrev = $response->hasPreviousPage();

// Convenience methods
$first = $response->first();
$last = $response->last();
$isEmpty = $response->isEmpty();
$count = count($response);

// Array access
$item = $response[0];

// Iteration
foreach ($response as $deal) {
    echo $deal['name'];
}
```

### Fetching All Pages

[](#fetching-all-pages)

To automatically paginate through all results:

```
// Returns a Generator that yields individual items
foreach ($client->deals()->paginate() as $deal) {
    echo $deal['name'];
}

// Or get all results as an array (may use significant memory for large datasets)
$allDeals = $client->deals()->allPages();
```

Available Resources
-------------------

[](#available-resources)

### Standard Resources

[](#standard-resources)

These resources support `all()`, `find()`, `paginate()`, and `allPages()` methods:

```
$client->activities()->all();
$client->activities()->find($id);

$client->contacts()->all();
$client->contacts()->find($id);

$client->contracts()->all();
$client->contracts()->find($id);

$client->deals()->all();
$client->deals()->find($id);

$client->ios()->all();
$client->ios()->find($id);

$client->leads()->all();
$client->leads()->find($id);

$client->mediaPlans()->all();
$client->mediaPlans()->find($id);

$client->pmps()->all();
$client->pmps()->find($id);

$client->products()->all();
$client->products()->find($id);

$client->quotas()->all();
$client->quotas()->find($id);

$client->rateCards()->all();
$client->rateCards()->find($id);

$client->stages()->all();
$client->stages()->find($id);

$client->teams()->all();
$client->teams()->find($id);

$client->users()->all();
$client->users()->find($id);
```

### List-Only Resources

[](#list-only-resources)

These resources only support listing (no individual retrieval):

```
$client->activityTypes()->all();
```

### Nested Resources

[](#nested-resources)

Some resources are accessed through parent resources:

```
// Content Fees for an IO
$client->contentFees()->forIo($ioId);
$client->contentFees()->findForIo($ioId, $contentFeeId);

// Deal Products for a Deal
$client->dealProducts()->forDeal($dealId);
$client->dealProducts()->findForDeal($dealId, $dealProductId);

// Display Line Items for an IO
$client->displayLineItems()->forIo($ioId);
$client->displayLineItems()->findForIo($ioId, $lineItemId);

// IO Line Items for an IO
$client->ioLineItems()->forIo($ioId);
$client->ioLineItems()->findForIo($ioId, $lineItemId);

// Itemized Costs for a Line Item
$client->itemizedCosts()->forLineItem($ioId, $lineItemId);
$client->itemizedCosts()->findForLineItem($ioId, $lineItemId, $costId);

// Media Plan Line Items
$client->mediaPlanLineItems()->forMediaPlan($mediaPlanId);
$client->mediaPlanLineItems()->findForMediaPlan($mediaPlanId, $lineItemId);

// PMP Items
$client->pmpItems()->forPmp($pmpId);
$client->pmpItems()->findForPmp($pmpId, $itemId);

// PMP Item Daily Actuals
$client->pmpItemDailyActuals()->forPmpItem($pmpId, $itemId);
$client->pmpItemDailyActuals()->findForPmpItem($pmpId, $itemId, $actualId);
```

Error Handling
--------------

[](#error-handling)

The client throws specific exceptions for different error conditions:

```
use FoundryCo\Boostr\Exceptions\AuthenticationException;
use FoundryCo\Boostr\Exceptions\ApiException;
use FoundryCo\Boostr\Exceptions\BoostrException;

try {
    $client->authenticate('user@example.com', 'wrong-password');
} catch (AuthenticationException $e) {
    // Invalid credentials, expired token, etc.
}

try {
    $deal = $client->deals()->find(99999);
} catch (ApiException $e) {
    $statusCode = $e->getCode();       // HTTP status code
    $response = $e->getResponse();     // PSR-7 Response object
    $body = $e->getErrorBody();        // Parsed JSON error body
}
```

Custom Base URL
---------------

[](#custom-base-url)

By default, the client connects to `https://app.boostr.com`. You can specify a different base URL:

```
$client = new BoostrClient('https://custom.boostr.com');
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance88

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Recently: every ~5 days

Total

7

Last Release

122d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/107836?v=4)[Josh Butts](/maintainers/jimbojsb)[@jimbojsb](https://github.com/jimbojsb)

---

Top Contributors

[![jimbojsb](https://avatars.githubusercontent.com/u/107836?v=4)](https://github.com/jimbojsb "jimbojsb (11 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/foundryco-boostr/health.svg)

```
[![Health](https://phpackages.com/badges/foundryco-boostr/health.svg)](https://phpackages.com/packages/foundryco-boostr)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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