Search by

zapz / sdk

zapz

Official PHP SDK for the ZapZ WhatsApp API

v0.1.4 2026-11-25 17:41 UTC

This package is auto-updated.

Last update: 2026-11-25 18:04:13 UTC


README

Official PHP 8.1+ SDK for the ZapZ WhatsApp API. Needs only ext-curl.

Documentation: https://zapz.dev/#/docs

composer require zapz/sdk
$zapz = new ZapZ\ZapZ(getenv('ZAPZ_API_KEY'));
$msg = $zapz->messages->sendText('INSTANCE_ID', ['to' => '5511999999999', 'text' => 'Hello!']);
echo $msg['id'];

Resources: instances, messages, contacts, groups, webhooks, sandbox. The shape of each parameter is in the PHPDoc (array shapes), which PhpStorm and PHPStan understand.

Options: new ZapZ($key, ['baseUrl' => ..., 'timeout' => 30.0, 'maxRetries' => 2]).

Exceptions extend ZapZ\Exception\ZapZException (status, errorCode, retryAfter, body).

Webhooks (Laravel)

$event = ZapZ\Webhook::verify($request->getContent(), $request->headers->all(), env('ZAPZ_WEBHOOK_SECRET'));

License

MIT