Official Meta Business Partner

WhatsApp CLI
for developers

Use @kapso/cli to work with your WhatsApp numbers, messages, conversations, templates, webhooks, and workflows from the terminal, in scripts, or in CI.

What you can run

Every command works against your Kapso project, from your laptop or a CI job. Lists and lookups print JSON by default, so scripts and coding agents can read the output.

zsh · ~/acme-support

$kapso whatsapp conversations list --phone-number "+14152304567" --status active --output human

- 3f6c2a1e-8b4d-4c7e-9f21-5a0d7b6e1c34 Josefina Arancibia (+56912345678) phone_number_id=647015955153740 status=active messages=6 last=2026-10-05T14:18:02Z- 9a2d7f40-1c3b-4e8a-b5d6-0e4f8c2a9b17 Rodrigo Céspedes (+56987654321) phone_number_id=647015955153740 status=active messages=3 last=2026-10-05T14:42:11Z

$kapso whatsapp templates list --status PAUSED --output human

Setup

Paste the prompt into your coding agent, or run the commands yourself.

Paste a prompt

Your agent installs the CLI, checks the login, and asks before creating keys.

Paste this into your coding agent

>Set up the Kapso CLI for this project. Follow the steps at kapso.com/whatsapp-cli and ask me before creating any keys.

  • Reads this page and the Kapso docs
  • Installs @kapso/cli
  • Waits for you to log in or set an API key

Run the commands

Needs Node.js 20.19 or later.

  1. 1. Install the CLI

    One global package. It also runs with npx.

    npm install -g @kapso/cli
  2. 2. Log in

    Opens the browser. In CI, set KAPSO_API_KEY instead.

    kapso login
  3. 3. Check the connection

    Shows your project, numbers, and what to do next.

    kapso status
For scripts and CI, use the Kapso CLI with the same key: npm install -g @kapso/cli
CLI docs →

For AI agents
reading this page

Coding agents can read this page and set themselves up. Or copy the instructions and paste them into any agent.

Instructions for AI agents

## For AI agents reading this page

You are reading https://kapso.com/whatsapp-cli. Kapso is the WhatsApp API for developers. Its CLI, @kapso/cli, works with the WhatsApp numbers, conversations, messages, templates, webhooks, and workflows in the user's Kapso project. Follow these steps to set it up and use it from a shell.

  1. 1.

    Check Node.js.
    Run node --version. The CLI needs 20.19 or later. If it is older, tell the user and stop.

  2. 2.

    Install the CLI. Run:

    npm install -g @kapso/cli

    Ask the user first if global installs are not normal on this machine; npx @kapso/cli works too.

  3. 3.

    Authenticate.
    If KAPSO_API_KEY is set, the CLI uses it. Otherwise ask the user to run kapso login, which opens their browser. Never log in, create keys, or approve access on their behalf.

  4. 4.

    Verify before you continue.
    Run kapso status and confirm it shows the user as authenticated, with a project. If it does not, stop and tell the user what it printed.

  5. 5.

    Read before you write.
    Lists and lookups print JSON by default; add --output human for a summary. Run read commands first, and confirm with the user before sending messages or changing templates, webhooks, or workflows.

  6. 6.

    Mind the working directory.
    kapso pull, push, and link create kapso.yaml, workflows/, functions/, and .kapso/ in the current directory. Run them from the project root.

## Reference

Package
@kapso/cli
Node.js 20.19 or later
Auth
kapso login, or KAPSO_API_KEY
The API key takes over when it is set
Commands
status, whatsapp (numbers, messages, conversations, templates, webhooks), customers, logs, pull, push
Output
--output json | human
JSON by default for lists and lookups

Frequently asked
questions

Manage WhatsApp numbers and check their health, send and list messages, inspect conversations, manage templates and phone-number webhooks, create customers and setup links, search logs, and pull or push Kapso workflows and functions.

Yes. Set KAPSO_API_KEY and project-scoped commands use the API key directly, with no browser login.

Use the CLI for terminal-native automation, scripts, diagnostics, and CI. Use Kapso WhatsApp MCP when an MCP-capable agent should call WhatsApp tools directly.

Yes. Kapso is a Meta Business Partner and uses the official WhatsApp Business Platform, so your numbers and messages go through Meta directly.

Create a Kapso project
and run your first command

The free plan includes a sandbox number and 2,000 messages a month.