Skip to main content

What you need

  • A Kapso project
  • A connected WhatsApp number
  • A project API key
  • An agent runtime that can read and send WhatsApp messages through Kapso
If your number is already connected, skip to configure your agent.

Connect a number

# install the CLI
curl -fsSL https://kapso.ai/install.sh | bash

# connect a number
kapso setup

# check your numbers
kapso whatsapp numbers list
For other connection paths, see Connect WhatsApp.

Configure your agent

Create a project API key in Sidebar → API keys. Get the phone number ID for the number you want to use:
kapso whatsapp numbers list --output json
Copy the id for the right number, then export both values:
export KAPSO_API_KEY="your_project_api_key"
export KAPSO_PHONE_NUMBER_ID="your_phone_number_id"

What your agent can do

With the CLI, your agent can operate WhatsApp directly from the terminal.

Send messages

# send a text message
kapso whatsapp messages send \
  --phone-number-id $KAPSO_PHONE_NUMBER_ID \
  --to "+1234567890" \
  --text "Your order has shipped"

# send a JSON payload (media, interactive, templates)
kapso whatsapp messages send \
  --phone-number-id $KAPSO_PHONE_NUMBER_ID \
  --input message.json

Read conversations

# list recent conversations
kapso whatsapp conversations list --phone-number-id $KAPSO_PHONE_NUMBER_ID

# list inbound messages
kapso whatsapp messages list \
  --phone-number-id $KAPSO_PHONE_NUMBER_ID \
  --direction inbound \
  --limit 20

Set up webhooks

# receive messages via webhook
kapso whatsapp webhooks new \
  --phone-number-id $KAPSO_PHONE_NUMBER_ID \
  --url "https://your-agent.example.com/webhook" \
  --event whatsapp.message.received \
  --active
All commands support --output json for structured parsing. See the CLI reference for the full command list.

OpenClaw bridge

If you’re using OpenClaw, there’s a ready-made bridge:
# install
curl -fsSL https://raw.githubusercontent.com/Enriquefft/openclaw-kapso-whatsapp/main/scripts/install.sh | bash

# preflight check
kapso-whatsapp-cli preflight

# start the bridge
kapso-whatsapp-bridge
Polling mode works with zero extra config. The bridge targets the local OpenClaw Gateway on ws://127.0.0.1:18789 by default — set OPENCLAW_TOKEN if your gateway requires auth. For other runtimes, use the same Kapso values and adapt the transport on your side.

Build with AI

Agent skills, llms.txt, and MCP setup for AI coding agents.

Connect WhatsApp

Compare instant setup, WhatsApp Business app, and bring your own SIM.