# Zapo ## Getting started - [Introduction](https://zapo.to/en/introduction.md): zapo is a high-performance TypeScript implementation of the WhatsApp Web protocol, built for high-scale, multi-session bot and automation workloads. - [Installation](https://zapo.to/en/installation.md): Install zapo-js with npm, pnpm, or yarn, choose a storage backend for credentials, and add the optional peer dependencies your features depend on. - [Quickstart](https://zapo.to/en/quickstart.md): Connect a WhatsApp session, scan the QR code or use a pairing code, and reply to your first incoming message in under five minutes with zapo. - [Migrating from Baileys](https://zapo.to/en/guides/migrating-from-baileys.md): Coming from Baileys? Here's how the connection lifecycle, store layout, message API, and event names map onto zapo's coordinator-based client. - [Use the docs from your AI assistant](https://zapo.to/en/use-with-ai.md): Pull these docs into Claude Code, Cursor, ChatGPT, or any MCP-capable agent — three integration paths, no setup on our side. ## Core concepts - [Architecture](https://zapo.to/en/concepts/architecture.md): How the WaClient, coordinators, stores, transport, and event flow fit together inside zapo, and how data moves from WhatsApp into your code. - [Authentication](https://zapo.to/en/concepts/authentication.md): Pair a device with a QR code or 8-character pairing code, persist Noise credentials across restarts, and cleanly log out of a WhatsApp session. - [Identities: phone numbers & LID](https://zapo.to/en/concepts/identities.md): How WhatsApp's phone-number JIDs (PN) and privacy LIDs differ, why both exist in multi-device, and how zapo maps and resolves between them. - [Configuration](https://zapo.to/en/concepts/configuration.md): Configure WaClient: sessions, timeouts, history sync, presence on connect, addons, proxy, logging, logout cleanup, and production knobs. - [Plugins](https://zapo.to/en/concepts/plugins.md): Extend WaClient with typed plugins: register stanza handlers, expose new coordinators at client[exposeAs], and contribute typed events that only exist when the plugin is installed. - [Events](https://zapo.to/en/concepts/events.md): Reference for every WaClient event you can subscribe to: messages, receipts, groups, history sync, app-state mutations, and failures. - [Stores](https://zapo.to/en/concepts/stores.md): Persist authentication state, Signal sessions, and per-domain protocol data through zapo's pluggable store interface and bundled backend packages. ## Guides ### Messaging - [Sending messages](https://zapo.to/en/guides/sending-messages.md): Send WhatsApp text, threaded replies, mentions, and rich link previews with client.message.send, the typed entry point for all outgoing content. - [Raw proto sends](https://zapo.to/en/guides/raw-sends.md): Send content types WhatsApp supports but zapo doesn't have a typed builder for yet — locations, contact vCards, group invites, buttons, list menus, interactive native flow, products, orders, newsletter admin invites, ephemeral toggles, phone-number requests, and Business PIX / review-and-pay payment… - [Media](https://zapo.to/en/guides/media.md): Send images, video, audio voice notes, documents, and stickers — and stream or download incoming WhatsApp media attachments with zapo's media helpers. - [Polls, reactions & edits](https://zapo.to/en/guides/interactive-messages.md): Send polls and votes, react to messages, pin and edit content, revoke sent messages, and handle the events for each — through the typed content union. - [Receiving messages](https://zapo.to/en/guides/receiving-messages.md): Handle incoming message events: extract text and media, send delivery and read receipts, decrypt addons, and request older history. ### Conversations - [Managing chats](https://zapo.to/en/guides/chats.md): Mute, pin, archive, mark as read, lock, star, clear, and delete WhatsApp chats with the typed client.chat coordinator backed by app-state mutations. - [Groups & communities](https://zapo.to/en/guides/groups.md): Create groups, manage participants and admins, handle invites, configure community sub-groups, and react to group events with zapo. - [Newsletters (channels)](https://zapo.to/en/guides/newsletters.md): Create, discover, follow, post to, react on, and administer WhatsApp channels (newsletters) using the client.newsletter coordinator in zapo. - [Broadcast lists](https://zapo.to/en/guides/broadcast-lists.md): Define a WhatsApp broadcast list with zapo and send a single message to many recipients at once without creating a group or revealing the list. ### Peers & profile - [Bots](https://zapo.to/en/guides/bots.md): Discover WhatsApp bots, send prompts, and receive streamed responses with zapo. Works with any WhatsApp bot, including Meta AI and third-party agents. - [Presence & status](https://zapo.to/en/guides/presence-status.md): Broadcast online presence, send typing and recording indicators, subscribe to contact presence, and post WhatsApp status updates with text and media. - [Profile, privacy & business](https://zapo.to/en/guides/profile-privacy.md): Manage your WhatsApp profile, change privacy settings, edit the blocklist, and read business profiles and hours with the profile coordinator. ### Operations - [Reconnection](https://zapo.to/en/guides/reconnection.md): zapo does not auto-reconnect by design — follow this pattern to detect dropped sessions, rebuild the client, and resume without duplicate connections. - [Errors & disconnects](https://zapo.to/en/guides/errors.md): Read DisconnectReason codes, handle stream failures and error stanzas from WhatsApp, and decide when to reconnect versus stop the session for good. - [Multi-session deployments](https://zapo.to/en/guides/multi-session.md): Run many WhatsApp accounts in one process with a shared store — what's per-session vs shared, the single-writer rule, memory budget, sharding, and graceful shutdown. - [Production & deployment](https://zapo.to/en/guides/production.md): Run zapo reliably in production: durable persistence, graceful shutdown, scaling multiple sessions, reconnection strategy, and the knobs that matter. - [End-to-end testing without WhatsApp](https://zapo.to/en/guides/e2e-testing.md): Run your bot / CRM / notification pipeline against @zapo-js/fake-server — a real Noise / Signal / WhatsApp-protocol server in-process, no phone tied up, no risk to production accounts. Works with any conforming client (zapo, Baileys, whatsmeow). ### Extras - [Troubleshooting & FAQ](https://zapo.to/en/troubleshooting.md): Answers to the most common questions and pitfalls when running zapo: pairing failures, disconnects, missing events, history sync, and store corruption. - [Recipes](https://zapo.to/en/guides/recipes.md): Copy-paste patterns for the most common things you'll build with zapo — command bots, media handling, threaded replies, and group moderation tasks. ## Plugins - [WAM telemetry (analytics parity)](https://zapo.to/en/guides/wam.md): Emit the client-side w:stats telemetry batches a real WhatsApp Web tab sends, for wire parity and anti-fingerprinting — via the @zapo-js/wam plugin. ### VoIP - [Calls (VoIP)](https://zapo.to/en/guides/voip.md): Place and answer WhatsApp voice and video calls with @zapo-js/voip — a plugin that exposes a coordinator at client.voip, decodes inbound PCM and H.264 frames, and lets you feed live outbound media with backpressure. - [Group calls](https://zapo.to/en/guides/voip-groups.md): Place, answer, join and leave WhatsApp group calls with @zapo-js/voip — the roster and composition model, per-participant attribution, mute requests, group video, and the heartbeat that keeps this side on the call. - [Call media on another host](https://zapo.to/en/guides/voip-media.md): Run a WhatsApp call's media in the browser with @zapo-js/voip-media while signaling stays on the server — the remote-media wire protocol, the WaCallMediaReceiver lifecycle, and the browser audio and video adapters. ## Reference - [WaClient & coordinators](https://zapo.to/en/reference/client.md): Complete method reference for WaClient and every coordinator: auth, message, presence, chat, group, newsletter, profile, and more. - [Message types](https://zapo.to/en/reference/message-types.md): Every send content variant in zapo — the typed builders discriminated by `type`, and the raw Proto.IMessage fields the library recognizes on receive. - [Chat mutations (app-state)](https://zapo.to/en/reference/chat-mutations.md): Every client.chat operation — the typed convenience helpers and the generic set and remove calls over the full app-state schema surface in zapo. - [Low-level API](https://zapo.to/en/reference/low-level.md): The raw escape hatch — send protocol nodes, issue IQs to WhatsApp, and register custom incoming-node handlers and filters when the high-level API is not enough. - [Stores reference](https://zapo.to/en/reference/stores.md): Configuration reference for the SQLite, PostgreSQL, MySQL, Redis, and MongoDB store backend packages, including fields, defaults, and examples. - [JIDs, helpers & constants](https://zapo.to/en/reference/jid-helpers.md): Build, parse, and inspect WhatsApp JIDs, plus every WA_* protocol constant exported from the zapo-js package root for use in your own code. - [Glossary](https://zapo.to/en/reference/glossary.md): Definitions of the WhatsApp protocol and zapo terms used across the docs: JID, LID, stanza, prekey, sender key, app-state, coordinator, fanout, Noise. ## Advanced - [The WhatsApp protocol](https://zapo.to/en/concepts/protocol.md): A tour of the WhatsApp multi-device protocol — Noise transport, XML stanzas, Signal encryption, and how zapo implements each layer in TypeScript. - [Architecture in depth](https://zapo.to/en/concepts/internals.md): How zapo handles Noise handshakes, Signal sessions, prekey rotation, sender keys, app-state mutations, and the write-behind store internally. - [Mobile connections](https://zapo.to/en/concepts/mobile.md): Connect zapo as a primary mobile (Android or iOS) WhatsApp client over the TCP transport instead of a companion device, including the limitations involved. - [Dev tools (MCP & fake server)](https://zapo.to/en/dev-tools.md): Optional dev-only packages: an MCP server to drive a live WaClient from an AI agent, and an in-process fake WhatsApp server for offline integration tests. ## Reverse engineering - [WhatsApp passkey & Shortcake linking](https://zapo.to/en/reverse-engineering/passkey-linking.md): An independent reverse-engineering of WhatsApp's passkey-gated device linking — the Shortcake / CRSC protocol, its cryptography, a correlated mobile ⇄ web wire capture, and why there is no headless bypass. ## Optional - [GitHub](https://github.com/vinikjkkj/zapo) - [npm](https://www.npmjs.com/package/zapo-js) - [Sponsor](https://github.com/sponsors/vinikjkkj) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Brazilian Portuguese (47 pages)](https://zapo.to/_llms/pt-br.txt): Documentation for Brazilian Portuguese. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.