Skip to main content
The Wassist CLI is the fastest way to test agents and webhooks without leaving your terminal. It uses your existing Wassist account and the same /api/v1 endpoints as the dashboard.
The CLI requires Node.js 22+ (it uses the built-in WebSocket global). See the GitHub source or @wassist/cli on npm.

Install

Authenticate

You’ll be prompted for your phone number, then a 6-digit code arrives on WhatsApp from the Wassist sandbox number — the same number you’ll send test messages to in a moment. Confirm you’re signed in:
After login the CLI is automatically scoped to your sandbox conversation — a one-on-one chat between your personal WhatsApp and the Wassist sandbox number. Sandbox mode means most commands don’t need a [to-number] argument.
Switch between sandbox and a real WhatsApp number any time with wassist use sandbox or wassist use <your-number>.

Sending messages

WhatsApp only lets you send free-form messages inside an active 24-hour customer-care window. Before your first messages send, either message the Wassist sandbox number from your phone to open the window, or send a pre-approved template message (see Outside the 24-hour window below).
The messages send command supports the full WhatsApp message envelope — text, media, buttons, and footers — composed via flags.

Validation rules

  • Text body — max 1024 characters.
  • Buttons — max 3 total, all the same type.
  • Media — must be a publicly reachable HTTPS URL.
  • Button labels — max 20 characters, formatted "Label|value".

Outside the 24-hour window

If the conversation’s customer-care 24-hour window has lapsed (no inbound user message in the last 24 hours), the CLI prompts you to pick a pre-approved template instead — the same constraint as the WhatsApp Business API enforces directly.

Streaming inbound messages

messages listen opens a WebSocket session, so every inbound WhatsApp message lands in your terminal in real time. Behind the scenes Wassist creates a managed webhook for this session and tunnels it through a WebSocket relay — you don’t need to expose a public URL.
In interactive mode you can reply inline. The > prompt accepts the same --media, --url-button, and --reply flags as messages send:
messages listen is ideal when you’re iterating on an agent or a webhook handler and want to see events the instant they arrive. It runs alongside your own webhooks — both fire on every inbound message.

Combining the CLI with webhooks

A common dev loop:
  1. Configure your own webhook in the dashboard pointing at your local dev server (via your tunneling tool of choice — ngrok, Cloudflare Tunnel, Tailscale Funnel, etc.).
  2. In another terminal, run wassist messages listen so you can watch inbound messages while your webhook is processing them.
  3. Send a test event from the dashboard (wassist.app/developers/webhooks → your webhook → Send test event) or send a real message from your phone.
  4. Inspect the delivery in Developers → Webhooks → Deliveries for the full request/response timeline, or click Replay to re-send it without retyping anything on WhatsApp.
See the developer quickstart for an end-to-end walkthrough.

Moving to your own number

The sandbox is great for development. To message real contacts, connect a WhatsApp Business number:
1

Upgrade your plan

A Wassist subscription is required to connect your own number.
2

Link your WhatsApp Business Account

Opens Meta’s embedded signup in your browser so you can pick (or claim) a phone number.
3

Switch to your number

4

Send messages to real contacts

With your own number active, include the recipient’s E.164 number:
To switch back to the sandbox: wassist use sandbox.

Command reference

Authentication

Number management

Messaging

In sandbox mode the phone-number argument is optional — the CLI resolves your single sandbox conversation automatically.

Billing

Configuration

The CLI stores its auth token and active number locally via conf. The default backend is https://backend.wassist.app; this can be overridden in the config file for development.

Policies

By sending messages through the Wassist CLI you agree to: Violations may restrict your WhatsApp Business Account or Wassist account.