PHPackages                             wazen/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. wazen/sdk

ActiveLibrary[API Development](/categories/api)

wazen/sdk
=========

Official PHP SDK for the Wazen WhatsApp API

v0.4.0(1mo ago)03MITPHPPHP &gt;=8.1

Since Mar 26Pushed 1mo agoCompare

[ Source](https://github.com/irixsoft/wazen-php-sdk)[ Packagist](https://packagist.org/packages/wazen/sdk)[ Docs](https://wazen.dev)[ RSS](/packages/wazen-sdk/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Wazen PHP SDK
=============

[](#wazen-php-sdk)

Official PHP SDK for the [Wazen WhatsApp API](https://wazen.dev).

[![Packagist](https://camo.githubusercontent.com/b79ed05cb26e77095a83a548f272585fb2d026f4f79c0a780d986998bcc822c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77617a656e2f73646b)](https://packagist.org/packages/wazen/sdk)[![PHP](https://camo.githubusercontent.com/90e98c6eeab150ee3291e5209e4cfc4da7cfa99f34cdf59e61a1f206ba33b03b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d666666)](https://php.net)

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

[](#installation)

```
composer require wazen/sdk
```

Quick Start
-----------

[](#quick-start)

```
use Wazen\Wazen;

$wazen = new Wazen('wz_your_api_key');

// Send a message
$message = $wazen->messages->send('session-id', [
    'to' => '+1234567890',
    'type' => 'text',
    'content' => 'Hello from Wazen!',
]);

// List sessions
$sessions = $wazen->sessions->list();

// Check if a number is on WhatsApp
$result = $wazen->contacts->check('session-id', [
    'phone' => '+1234567890',
]);
```

Resources
---------

[](#resources)

All resources are accessible as properties on the client instance.

### Sessions

[](#sessions)

```
$wazen->sessions->create();
$wazen->sessions->list();
$wazen->sessions->get('session-id');
$wazen->sessions->delete('session-id');
$wazen->sessions->restart('session-id');
$wazen->sessions->getQr('session-id');
$wazen->sessions->factoryReset('session-id');
```

### Messages

[](#messages)

```
// Send text
$wazen->messages->send('session-id', [
    'to' => '+1234567890',
    'type' => 'text',
    'content' => 'Hello!',
]);

// Send image
$wazen->messages->send('session-id', [
    'to' => '+1234567890',
    'type' => 'image',
    'media_url' => 'https://example.com/photo.jpg',
]);

// Get message history
$wazen->messages->list('session-id', ['direction' => 'outgoing', 'limit' => 10]);

// Get single message
$wazen->messages->get('session-id', 'message-id');
```

### Groups

[](#groups)

```
$wazen->groups->list('session-id');
$wazen->groups->create('session-id', ['subject' => 'Team Chat', 'participants' => ['+1234567890']]);
$wazen->groups->get('session-id', 'group-id');
$wazen->groups->update('session-id', 'group-id', ['subject' => 'New Name']);
$wazen->groups->leave('session-id', 'group-id');
$wazen->groups->manageParticipants('session-id', 'group-id', ['action' => 'add', 'participants' => ['+0987654321']]);
$wazen->groups->sendMessage('session-id', 'group-id', ['type' => 'text', 'content' => 'Hello group!']);
```

### Channels

[](#channels)

```
$wazen->channels->create('session-id', ['name' => 'Product Updates', 'description' => 'Latest news']);
$wazen->channels->sendMessage('session-id', 'channel-id', ['type' => 'text', 'content' => 'New release!']);
```

### Contacts

[](#contacts)

```
// Check single number
$wazen->contacts->check('session-id', ['phone' => '+1234567890']);

// Bulk check
$wazen->contacts->bulkCheck('session-id', ['phones' => ['+1234567890', '+0987654321']]);
```

### Warming

[](#warming)

```
$wazen->warming->start('session-id', [
    'contacts' => [
        ['phone' => '+1234567890', 'name' => 'Alice'],
        ['phone' => '+0987654321'],
    ],
]);
$wazen->warming->getStatus('session-id');
$wazen->warming->pause('session-id');
$wazen->warming->resume('session-id');
$wazen->warming->cancel('session-id');
```

### Webhooks

[](#webhooks)

```
$wazen->webhooks->create([
    'url' => 'https://your-app.com/webhooks/wazen',
    'events' => ['message.received', 'message.delivered'],
]);
$wazen->webhooks->list();
$wazen->webhooks->update('webhook-id', ['enabled' => false]);
$wazen->webhooks->delete('webhook-id');
$wazen->webhooks->test('webhook-id');
$wazen->webhooks->getLogs('webhook-id');
```

### Account

[](#account)

```
$account = $wazen->account->get();
$usage = $wazen->account->getUsage();
```

### API Keys

[](#api-keys)

```
$key = $wazen->apiKeys->create(['name' => 'new-key']);
$wazen->apiKeys->list();
$wazen->apiKeys->revoke('key-id');
```

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

[](#configuration)

```
$wazen = new Wazen('wz_your_api_key', [
    'base_url' => 'https://wazen.dev/api/v1', // default
    'timeout' => 30,                           // default, in seconds
]);
```

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

[](#error-handling)

```
use Wazen\Wazen;
use Wazen\Exceptions\WazenApiException;

try {
    $wazen->messages->send('session-id', [
        'to' => '+1234567890',
        'type' => 'text',
        'content' => 'Hi',
    ]);
} catch (WazenApiException $e) {
    echo $e->getStatusCode();  // HTTP status code
    echo $e->getErrorCode();   // API error code
    echo $e->getMessage();     // Error message
}
```

Laravel Integration
-------------------

[](#laravel-integration)

### Auto-Discovery

[](#auto-discovery)

The service provider is auto-discovered by Laravel. Just add your API key to `.env`:

```
WAZEN_API_KEY=wz_your_api_key
```

### Publish Config (Optional)

[](#publish-config-optional)

```
php artisan vendor:publish --tag=wazen-config
```

This creates `config/wazen.php`:

```
return [
    'api_key' => env('WAZEN_API_KEY'),
    'base_url' => env('WAZEN_BASE_URL', 'https://wazen.dev/api/v1'),
    'timeout' => env('WAZEN_TIMEOUT', 30),
];
```

### Usage

[](#usage)

```
use Wazen\Wazen;

// Via dependency injection
public function sendMessage(Wazen $wazen)
{
    $wazen->messages->send('session-id', [
        'to' => '+1234567890',
        'type' => 'text',
        'content' => 'Hello!',
    ]);
}

// Via facade
Wazen::messages()->send('session-id', [...]);
```

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

[](#requirements)

- PHP 8.1 or later
- A Wazen account with an active subscription
- An API key from your [Dashboard](https://wazen.dev/dashboard/developers)

Links
-----

[](#links)

- [API Documentation](https://wazen.dev/docs)
- [Dashboard](https://wazen.dev/dashboard)
- [TypeScript SDK](https://www.npmjs.com/package/@wazen/sdk)
- [Python SDK](https://pypi.org/project/wazen)
- [.NET SDK](https://www.nuget.org/packages/Wazen)

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance93

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Total

4

Last Release

37d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d07cc33edc800e0293409e6c4d62f7874c80f51b6663bf6b189d0c4835719cb?d=identicon)[msaeedsakib](/maintainers/msaeedsakib)

---

Top Contributors

[![msaeedsakib](https://avatars.githubusercontent.com/u/96891752?v=4)](https://github.com/msaeedsakib "msaeedsakib (2 commits)")

---

Tags

apisdkwhatsappwazen

### Embed Badge

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

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

###  Alternatives

[resend/resend-php

Resend PHP library.

596.2M35](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.5M10](/packages/checkout-checkout-sdk-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[clicksend/clicksend-php

301.6M11](/packages/clicksend-clicksend-php)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[fingerprint/fingerprint-pro-server-api-sdk

Fingerprint Server API allows you to get, search, and update Events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.

32250.3k1](/packages/fingerprint-fingerprint-pro-server-api-sdk)

PHPackages © 2026

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