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.3(3y ago)025MITPHPPHP ^7.4|^8.0

Since May 6Pushed 3y 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 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

4

Last Release

1426d ago

### 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 (9 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

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M718](/packages/statamic-cms)[openai-php/laravel

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

3.7k7.6M74](/packages/openai-php-laravel)[atymic/twitter

Twitter API for PHP &amp; Laravel

945555.4k2](/packages/atymic-twitter)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

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

DocuWare integration with Laravel

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

PHPackages © 2026

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