CLI reference▾
CLI reference
Every sendport command, flag, environment variable and exit code.
Commands
| Command | Does |
|---|---|
sendport login | Authorise the CLI and store a key |
sendport logout | Remove a stored credential |
sendport whoami | Show the active profile and account |
sendport numbers ls | List connected WhatsApp numbers |
sendport numbers get <id> | Show one number's quality and tier |
sendport messages send | Send text, template or media |
sendport messages ls | List recent messages |
sendport messages get <id> | Show one message and its status timeline |
sendport messages watch | Stream messages live |
sendport contacts ls | List contacts |
sendport contacts add | Create a contact |
sendport contacts rm <wa_id> | Delete a contact and their history |
sendport conversations ls | List threads |
sendport conversations open <wa_id> | Print a thread in the terminal |
sendport templates ls|create|rm | Manage templates |
sendport broadcasts ls|create|cancel | Manage broadcasts |
sendport media upload <path> | Upload a file, print the media id |
sendport webhooks listen|trigger|deliveries | Local webhook tooling |
sendport open | Open the dashboard in a browser |
sendport version | Print version and check for updates |
Environment variables
| Variable | Effect |
|---|---|
SENDPORT_KEY | API key. Takes precedence over the config file. |
SENDPORT_PROFILE | Profile to use when --profile is absent. |
SENDPORT_API_URL | Override the base URL. For self-hosted proxies. |
SENDPORT_CONFIG | Path to the config file. Default ~/.sendport/config.toml. |
NO_COLOR | Any value disables ANSI colour. |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic failure |
2 | Bad usage — unknown flag, missing argument |
3 | Not authenticated, or the key was revoked |
4 | API returned 4xx |
5 | API returned 5xx, or the network failed |
6 | Rate limited after exhausting retries |
Scripting
Pass
--json and parse with jq. Exit codes are stable across releases, so set -e behaves predictably in CI.