PHPackages                             zaptilo/whatsapp - 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. zaptilo/whatsapp

ActiveLibrary[API Development](/categories/api)

zaptilo/whatsapp
================

Zaptilo WhatsApp Business API SDK for PHP — Send text, media, and template messages via WhatsApp.

00PHP

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/zaptilo/php-whatsapp)[ Packagist](https://packagist.org/packages/zaptilo/whatsapp)[ RSS](/packages/zaptilo-whatsapp/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Zaptilo WhatsApp Business API SDK for PHP
=========================================

[](#zaptilo-whatsapp-business-api-sdk-for-php)

Official PHP SDK for the [Zaptilo](https://zaptilo.ai) WhatsApp Business API. Send text, media, and template messages via WhatsApp with a simple, clean API.

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

[](#installation)

```
composer require zaptilo/whatsapp
```

**Requirements:** PHP 7.4+, cURL extension, JSON extension

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

[](#quick-start)

```
use Zaptilo\WhatsApp\Zaptilo;

$zaptilo = new Zaptilo('YOUR_API_TOKEN');

// Send a text message
$response = $zaptilo->sendMessage('919876543210', 'Hello from Zaptilo!');
```

Get your API token from the [Zaptilo Dashboard](https://web.zaptilo.ai) under **Developer Tools &gt; Access Tokens**.

Usage
-----

[](#usage)

### Send Text Message

[](#send-text-message)

```
$zaptilo->sendMessage('919876543210', 'Hello! Your order has been confirmed.');
```

### Send Template Message

[](#send-template-message)

```
$zaptilo->sendTemplate(
    '919876543210',        // Phone number
    'order_update',        // Template name
    'en',                  // Language
    ['John', 'Shipped'],   // Body parameter values
    ['#ORD-1234']          // Header parameter values (optional)
);
```

### Send Media Message

[](#send-media-message)

```
// Send image
$zaptilo->sendMedia('919876543210', 'https://example.com/photo.jpg', 'image', 'Check this out!');

// Send document
$zaptilo->sendMedia('919876543210', 'https://example.com/invoice.pdf', 'document', 'Your invoice');

// Send video
$zaptilo->sendMedia('919876543210', 'https://example.com/video.mp4', 'video');
```

### List Templates

[](#list-templates)

```
$templates = $zaptilo->getTemplates();

foreach ($templates['data'] as $template) {
    echo $template['name'] . ' - ' . $template['status'] . PHP_EOL;
}
```

### Check Credit Balance

[](#check-credit-balance)

```
$result = $zaptilo->getBalance();
echo 'Balance: ' . $result['balance'];
```

### Verify API Token

[](#verify-api-token)

```
$result = $zaptilo->verify();
echo $result['message']; // "API key is valid and active"
```

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

[](#error-handling)

```
use Zaptilo\WhatsApp\Zaptilo;
use Zaptilo\WhatsApp\ZaptiloException;

$zaptilo = new Zaptilo('YOUR_API_TOKEN');

try {
    $zaptilo->sendMessage('919876543210', 'Hello!');
} catch (ZaptiloException $e) {
    echo 'Error: ' . $e->getMessage();
    echo 'Code: ' . $e->getCode();
}
```

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

[](#configuration)

```
// Custom base URL (for self-hosted or staging)
$zaptilo = new Zaptilo('YOUR_TOKEN', 'https://your-domain.com');

// Custom timeout (default: 30 seconds)
$zaptilo = new Zaptilo('YOUR_TOKEN', 'https://zaptilo.ai', 60);
```

API Reference
-------------

[](#api-reference)

MethodDescription`sendMessage($number, $message)`Send a text message`sendMedia($number, $mediaUrl, $mediaType, $caption)`Send image, video, or document`sendTemplate($number, $templateName, $language, $bodyValues, $headerValues)`Send a template message`getTemplates()`List all approved templates`getBalance()`Get current credit balance`verify()`Verify API token and subscription statusLaravel Integration
-------------------

[](#laravel-integration)

Add your token to `.env`:

```
ZAPTILO_API_TOKEN=your_token_here

```

Create a service provider or use it directly:

```
use Zaptilo\WhatsApp\Zaptilo;

$zaptilo = new Zaptilo(env('ZAPTILO_API_TOKEN'));
$zaptilo->sendMessage('919876543210', 'Hello from Laravel!');
```

Links
-----

[](#links)

- [Zaptilo Website](https://zaptilo.ai)
- [API Documentation](https://zaptilo.ai/developers)
- [Dashboard / Sign Up](https://web.zaptilo.ai)
- [Node.js SDK](https://www.npmjs.com/package/zaptilo-whatsapp)

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bc4d320601a3a4eb9d11f170e02a75cea8b4a62ca6afdea04f8a5d58fc9be62?d=identicon)[zaptilo](/maintainers/zaptilo)

---

Top Contributors

[![zaptilo](https://avatars.githubusercontent.com/u/271956624?v=4)](https://github.com/zaptilo "zaptilo (1 commits)")

### Embed Badge

![Health badge](/badges/zaptilo-whatsapp/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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