zapmizer / laravel-notification-zapmizer
WhatsApp through Zapmizer for Laravel: notification channel, a number per model through the hosted connect flow, signed webhooks, embedded inbox and number verification.
Package info
github.com/zapmizer/laravel-notification-zapmizer
pkg:composer/zapmizer/laravel-notification-zapmizer
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.2 || ^8.0
- illuminate/http: ^8.83 || ^9.52 || ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/notifications: ^8.83 || ^9.52 || ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^8.83 || ^9.52 || ^10.0 || ^11.0 || ^12.0 || ^13.0
- symfony/polyfill-intl-idn: ^1.26
Requires (Dev)
- mockery/mockery: ^1.0
- opis/json-schema: ^2.4
- orchestra/testbench: ^6.48 || ^7.58 || ^8.18 || ^9.0 || ^10.0 || ^11.0
- phpunit/phpunit: ^9.5.10 || ^10.0 || ^11.0 || ^12.0
Suggests
- ext-curl: Enforces the 600 s total limit of media downloads; without it Guzzle's stream handler applies the timeout per read.
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.x-dev
- 2.2.0
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta.6
- 2.0.0-beta.5
- 2.0.0-beta.4
- 2.0.0-beta.3
- 2.0.0-beta.2
- 2.0.0-beta.1
- v1.0.1
- v1.0.0
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.02
- 0.1.1
- 0.1.0
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-release/2.2.0
- dev-release/2.1.0
- dev-feat/connect-webhook
- dev-release/2.0.0
- dev-fix/beta6-boraindicar
- dev-fix/beta5-decisoes
- dev-fix/beta4-compat
- dev-fix/aviso-app-url
- dev-fix/instalar-achados-teste-cego
- dev-feat/instalar-com-agente
- dev-fix/testes-guzzle-8
- dev-wiki
- dev-fase-3-contrato-mensagem
- dev-fase-3-webhook-eventos
- dev-fase-3-envio-tipado
- dev-fase-3-instancia-leitura
- dev-fase-2-release
- dev-fase-2-webhook
- dev-fase-2-connect
- dev-fase-2-embed
- dev-fase-2-instancia
- dev-fase-2-parceiro
- dev-fase-2-erros
- dev-fase-2-transporte
- dev-guzzle-8
- dev-sync-docs
- dev-received-messages
- dev-media-exceptions
- dev-media
- dev-connect-sem-wizard
- dev-fix/send-accept-json
- dev-connect
- dev-update/laravel-12
This package is auto-updated.
Last update: 2026-11-19 17:37:31 UTC
README
Install with an agent
Prompt for a coding agent (Claude Code, Cursor, Codex...):
Instale a lib zapmizer/laravel-notification-zapmizer neste app, com o connect e a caixa de entrada embutida. Siga o roteiro de docs/instalar.md da lib.
The commands, in order (Inertia + Vue 3 app; the guide covers Blade):
composer require "zapmizer/laravel-notification-zapmizer:^2.0" php artisan zapmizer:install --base-uri=https://app.zapmizer.com/api/ --model=App\\Models\\User --inbox --no-interaction # or https://app.parlichat.com/api/ php artisan migrate npm install github:zapmizer/embed#v0.1.3 axios lucide-vue-next # or bun/pnpm/yarn add, as the install output says php artisan zapmizer:check --json
Then mount resources/js/zapmizer/InboxScreen.vue (all the components sit in that one folder and import each other by relative paths, whatever the app's alias) on an authenticated page and rebuild the front: the embed brand (VITE_ZAPMIZER_BRAND, written by the installer) must be the one of the deploy ZAPMIZER_BASE_URI points at (parli for app.parlichat.com; another host is asked at /brand/manifest.json, and if it does not tell, ask the human), or the inbox never loads. Only a human knows the partner account's API (--base-uri: app.zapmizer.com or app.parlichat.com), has the partner credentials (ZAPMIZER_PARTNER_ID, ZAPMIZER_PARTNER_SECRET) and can get the app's host allowed on the partner account: ask, never make them up. The published components come unstyled (only zapmizer-* hook classes, no CSS): the app adapts them to its own look with its design system or UI kit, editing the files in resources/js/zapmizer/ freely (zapmizer:install --force overwrites them). Step by step, with what to ask and when to stop: docs/instalar.md (Portuguese).
Full guides live in
docs/. The wiki is a mirror ofdocs/onmain; editdocs/, not the wiki.
Send WhatsApp messages from Laravel through Zapmizer: a zapmizer notification channel and a ZapmizerMessage builder for text and files. On top of that, optional pieces you turn on as you need them: each model (a Team, a User) connects its own WhatsApp number in a hosted popup and receives messages on a signed webhook (Connectable), the conversation or the inbox opens embedded in your app (EmbedSessionResponse), and users verify their number (MustVerifyWhatsapp). Every exception of the package extends ZapmizerException, and the sending, connect and embed calls go through Laravel's Http, so Http::fake() covers them in tests; for the sends, NotificationChannels\Zapmizer\Facades\Zapmizer::fake() catches every one, whatever the path, with assertSent() and friends (see docs/envio.md).
Requirements
- PHP 8.1 or later.
- Laravel 8.83 to 13 (8.83+, 9.52+, 10, 11, 12 or 13).
- Zapmizer 1.148.10 or later.
- The
curlextension is suggested: without it the 600 s total limit of media downloads is applied per read.
Installation
composer require zapmizer/laravel-notification-zapmizer
Publish the config file:
php artisan vendor:publish --provider="NotificationChannels\Zapmizer\ZapmizerServiceProvider" --tag=config
Upgrading from 0.x? Read the upgrade lists at the top of the CHANGELOG first ("Upgrade das versões 0.0, 0.1 e 0.2" and "Upgrade da 0.3 e da 0.4"): this version breaks the 0.x API, and a published config/zapmizer.php does not get the new keys by itself.
Routes are opt-in. The package registers no route until you switch a group on: ZAPMIZER_ROUTES_CONNECT, ZAPMIZER_ROUTES_WEBHOOK, ZAPMIZER_ROUTES_INBOX, ZAPMIZER_ROUTES_VERIFY_NUMBER (all false by default; zapmizer:install switches on what its flags ask for). An app that only sends needs none. The webhook route only receives deliveries; whether the connect asks Zapmizer for a webhook on each user's connection is ZAPMIZER_CONNECT_WEBHOOK (unset, it follows the route). See the route groups.
Setting up your Zapmizer account
- Create an API token.
- Set the token and the number that sends:
ZAPMIZER_API_TOKEN="your-api-token" ZAPMIZER_FROM_NUMBER="558181643260"
That is the single-tenant setup: one token and one number for the whole application. To give each model its own number, see the connect guide below.
API version. Set ZAPMIZER_API_VERSION=2025-06-27 to track what you send (2026-10-20 works the same from Zapmizer 1.148.17 on; an older Zapmizer only knows 2025-06-27 for sending). The routes that read messages do not follow it: syncMessages() and createWebhook() always ask for the message contract, 2026-10-20.
Receiving messages (single-tenant). Create the webhook on Zapmizer's "Webhooks" screen in version 2026-10-20 (the message contract; 2024-02-27 also works, translated into the same Message), point it at https://your-app/zapmizer/webhook, put its secret in ZAPMIZER_WEBHOOK_SECRET and switch the route on with ZAPMIZER_ROUTES_WEBHOOK=true (add ZAPMIZER_CONNECT_WEBHOOK=false if the app also connects users' numbers and only wants this route for its own webhook, such as the verify_number.* events). Received messages fire MessageReceived, and what the number sends fires MessageSent. See Receiving messages.
Documentation
The guides live in docs/, in the order you will need them:
- Sending notifications (Portuguese)
- Errors (Portuguese)
- Connecting a number per model (multi-tenant)
- Embedding the conversation and the inbox (Portuguese)
- Number verification
- HTTP transport, timeouts and tests (Portuguese)
Changelog
See CHANGELOG.md.