Skip to main content
The Kapso CLI gives you full control over your WhatsApp integration from the command line. Send messages, manage webhooks, inspect conversations, and automate workflows — all without leaving your terminal. Using an MCP-capable agent? Use Project MCP when the agent should manage Kapso without shell access.

Installation

Requires Node.js >= 20.19.

Authentication

Browser login (interactive)
Opens your browser to authenticate. Your session is stored locally in ~/.kapso/cli/. API key (CI / non-interactive environments)
When set, all project-scoped commands use the API key directly — no browser needed. Use this for CI pipelines, Docker containers, scripts, or any headless environment. You can create your project API key in the Kapso dashboard.

Project context

After login, the CLI remembers your active project. Switch between projects with:
Check your full setup status:

Setup

Connect a WhatsApp number to your project:
This resolves your project and customer, then generates a setup link to connect or provision a WhatsApp number. For automation:

Numbers

Most WhatsApp commands accept --phone-number or --phone-number-id to specify which number to act on. You can also pass the number as a positional argument where supported.

Messages

Send a text message

Send with a JSON payload

For media, interactive, or any advanced message type, pass a JSON payload:

List and get messages

Conversations

Templates

Webhooks

Create a webhook

Available events: whatsapp.message.received, whatsapp.message.sent, whatsapp.message.delivered, whatsapp.message.read, whatsapp.message.failed, whatsapp.conversation.created, whatsapp.conversation.ended, whatsapp.conversation.inactive, whatsapp.contact.identity_changed.

Manage webhooks

Message buffering

Buffer multiple whatsapp.message.received events into a single delivery:

Customers

Local workflow development

Use these commands when you want to keep Kapso workflows and functions in a local repository.
kapso pull writes local source files for workflows and functions. If you edit workflows with @kapso/workflows, build the generated JSON before pushing:
You can also push one function or everything in the repo:
If a pull is blocked by local edits, inspect or replace the incoming changes:
See Build locally for the full workflow source-control guide.

Output formats

All commands support --output json or --output human. Most default to json — pipe into jq for scripting:

Help