PHPackages                             mralston/quake-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. [API Development](/categories/api)
4. /
5. mralston/quake-sdk

ActiveLibrary[API Development](/categories/api)

mralston/quake-sdk
==================

PHP SDK for the Quake API.

v1.0.6(yesterday)037MITPHPPHP ^8.4|^8.5

Since May 6Pushed 1mo ago1 watchersCompare

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

READMEChangelog (5)Dependencies (9)Versions (8)Used By (0)

Quake SDK
=========

[](#quake-sdk)

This is PHP SDK for Quake. The Quake platform provides WhatsApp and SMS message flow capabilities useful for recruitment, lead qualification and other automated two-way communication.

Visit the [Quake website](https://www.quake.co.uk/) for more information.

---

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

[](#installation)

You can install the package via composer:

```
composer require mralston/quake-sdk
```

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

[](#basic-usage)

```
use Mralston\Quake\Client;
use Mralston\Quake\Contact;
use Mralston\Quake\Flow;

// Log in
$client = new Client(
    $username,
    $password,
    $companyId,
    $apiEndpoint
);

// Create contact
$contact = $client->createContact(
    $firstName,
    $lastName,
    $mobileNumber
)

// Delete contact
$client->deleteContact($contact);

// Create flow instance
$flowInstance = $client->createFlowInstance(
    $flow,
    $contact,
    $parameters
);

// Fetch flow instance by ID
$flowInstance = $client->showFlowInstance($id);

// Invite a flow instance (trigger the flow)
$client->inviteFlowInstance($flowInstance);

// Fetch all flow instances
foreach ($client->listFlowInstances() as $flowInstance) {
    dump($flowInstance);
}

// Fetch all flows
foreach ($client->listFlows() as $flow) {
    dump($flow);
}

// Fetch all entities
foreach ($client->listEntities() as $entity) {
    dump($entity);
}
```

Fluent API
----------

[](#fluent-api)

Many of the objects exposed by the API support method chaining.

```
$client->createContact(
    $firstName,
    $lastName,
    $mobileNumber
)->createFlowInstance(
    Flow::make(['id' => $flowId])
)->invite();
```

Webhooks
--------

[](#webhooks)

The Quake platform can send push notifications to your application via webhooks. In order to use webhooks, your application must be able to respond to the challenge requests sent to it. Such challenges include a `crc_token` which must be combined with a signing key secret in order to send a valid response. Signing keys can be set up on the Quake website.

The `resolveWebhookChallenge()` method on the Quake client will take care of generating this response for you. All you need to do is provide it with the `crc_token` received and send back the response. Here is a basic example:

```
$client = new Client(
    $username,
    $password,
    $companyId,
    $apiEndpoint,
    $webhookSecret
);

$crcToken = $_GET['crc_token'];
$response = $client->resolveWebhookChallenge($crcToken);

echo $response;
```

Laravel
-------

[](#laravel)

**Configuration**

In Laravel, you can publish the config file with:

```
php artisan vendor:publish --provider="Mralston\Quake\QuakeServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'username' => env('QUAKE_USERNAME'),
    'password' => env('QUAKE_PASSWORD'),
    'company_id' => env('QUAKE_COMPANY_ID'),
    'api_endpoint' => env('QUAKE_API_ENDPOINT'),
    'webhook_secret' => env('QUAKE_WEBHOOK_SECRET')
];
```

Configure the three environment variables with your username, password and company ID. These are UUIDs supplied by Quake. The API endpoint is the base URL of the Quake platform, for example `https://www.quake.co.uk`.

```
QUAKE_USERNAME=
QUAKE_PASSWORD=
QUAKE_COMPANY_ID=
QUAKE_API_ENDPOINT=
QUAKE_WEBHOOK_SECRET=
```

**Dependency Injection**

In addition to the method chaining described in the fluent API section above, the Laravel integration takes care of authentication automatically. All you need to do is grab an instance of the client from the container and start using it.

You can use dependency injection to get a pre-authenticated instance of the client:

```
use Illuminate\Http\Request;
use Mralston\Quake\Client;

class MyController
{
    public function create(Request $request, Client $client)
    {
        // Create new contact using POST data
        $contact = $client->createContact(
            $request->input('first_name'),
            $request->input('last_name'),
            $request->input('mobile'),
        )
    }
}
```

Alternatively, you can resolve an instance of the client from the container:

```
use Mralston\Quake\Client;

$client = app(Client::class);
```

**Facade**

In true Laravel tradition, you can also use a facade (along with method chaining, of course!).

```
use Mralston\Quake\Facades\Quake;
use Mralston\Quake\Flow;

Quake::createContact(
    $firstName,
    $lastName,
    $mobileNumber
)->createFlowInstance(
    Flow::make(['id' => $flowId])
)->invite();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Matt Ralston](https://github.com/mralston)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

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

Recently: every ~378 days

Total

7

Last Release

1d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

v1.0.5PHP ^8.4|^8.5

### Community

Maintainers

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

---

Top Contributors

[![mralston](https://avatars.githubusercontent.com/u/248387?v=4)](https://github.com/mralston "mralston (10 commits)")

---

Tags

laravelquakemralston

### Embed Badge

![Health badge](/badges/mralston-quake-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mralston-quake-sdk/health.svg)](https://phpackages.com/packages/mralston-quake-sdk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.9k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M974](/packages/statamic-cms)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[smodav/mpesa

M-Pesa API implementation

16467.9k1](/packages/smodav-mpesa)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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