API
1MSG CLI: use the API from the command line
It's a new way to use WABA. Call methods from your pipeline — a terminal, a CI job, or a server.
Nikita L ·
You can call the WhatsApp Business API from bash, zsh, or whichever terminal you use — like git or curl. Drop that command into CI, cron, or another pipeline. It’s the same API as the SDK and MCP.
What CLI is for
CLI is a command-line interface: it turns the HTTP methods of the WhatsApp Business API into commands you run in a terminal. It talks to the API through the 1MSG SDK and pulls @1msg/sdk in as a dependency — the same requests you would make in code, invoked as a command.
You run 1msg with flags instead of assembling every HTTP call yourself: URL, token, headers, JSON, quoting. Host and token come from config or environment variables, so the command stays short. Get it working once, then reuse the same line. You don’t rebuild that request for every call the way you do with curl.
That same command is what you run in a terminal, add as a CI step, put in cron, or use over SSH on a remote server. Interactive, in a pipeline, on a schedule, on a box without your laptop — one client, not a new curl for each place.
HTTP, SDK, MCP, CLI: when to use what?
The API is HTTP: you call 1MSG with requests — any language, any client, no wrapper. That way is always there and is not competing with the tools below. The SDK, MCP, and CLI all sit on top of it.
Among those three, the CLI is for work from the terminal. Because it is a command, you can put it in a pipeline, build automation around it, and call the API on a remote server. Agents can use it instead of MCP when you already know what to run and you want to save tokens.
Use the SDK when you are building an integration. The API has to live in your application, in your language, in your stack. You call methods from code because WhatsApp is part of the product, not a one-off command.
Use MCP when the work goes through an AI agent: you are designing the flow in the assistant, or you are not writing the code yourself. The agent talks to the API for you.
Install and configure 1MSG CLI
You need Node.js 18 or newer. Run the package with npx, or install the 1msg binary:
npx -y @1msg/cli --help
npm i -g @1msg/cliThen run 1msg init. It asks for your instance id and token and writes a local config, so you are not pasting credentials into every command. Choose live if you are on a production channel, or sandbox if you want to try it on a free test channel.
After that, run 1msg status to check the channel. To send a message, use 1msg send or 1msg template send. If you do not have a channel yet, create a Test Channel in the 1MSG dashboard and run init against sandbox.
Try the CLI from the GitHub repo: install, run init, call a command.
