A Go command-line interface for the Zadarma VoIP API.
- Account balance lookup
- SIP listing and status lookup
- Phone/DID management commands:
- List owned numbers
- List available countries
- List country destinations
- Inspect a specific virtual number
- SMS commands:
- Send SMS
- List valid senders
- Get webhook URL
- Set webhook URL and enable SMS hooks
- Run a local listener for incoming SMS events
- PBX info lookup (with optional filters)
- Call statistics lookup (with optional filters)
- Text (default) and JSON output (
--output text|json) - Shell completion support (
completioncommand) - Debug logging (
--debug)
Build from source:
go build -o zadarma-cli ./cmd/zadarmaUse environment variables (recommended):
export ZADARMA_API_KEY="your_api_key"
export ZADARMA_API_SECRET="your_api_secret"Or pass per command:
zadarma-cli --key "KEY" --secret "SECRET" balancezadarma-cli [command] [flags]| Flag | Description |
|---|---|
-h, --help |
Show help |
-v, --version |
Show CLI version |
-k, --key |
Zadarma API key |
-s, --secret |
Zadarma API secret |
-o, --output |
Output format: text (default) or json |
-d, --debug |
Enable debug output |
zadarma-cli balance
zadarma-cli sip listzadarma-cli sip info <ID>zadarma-cli sip caller-id --id <ID> --number <NUMBER>
zadarma-cli phone list [number...]zadarma-cli phone countrieszadarma-cli phone country <code>zadarma-cli phone number <number>
zadarma-cli sms send --phone <number> --message <text> [--sender <sender>]zadarma-cli sms senders [phones]zadarma-cli sms senders --phones <comma-separated>zadarma-cli sms get-webhookzadarma-cli sms set-webhook <WEBHOOK> [--port <port>]zadarma-cli sms listen [--webhook <WEBHOOK>] [--port <port>]
zadarma-cli pbx info [--pbx-id <id>] [--numbers <comma-separated>]
zadarma-cli statistics [--start "YYYY-MM-DD HH:MM:SS"] [--end "YYYY-MM-DD HH:MM:SS"] [--sip <id>]
zadarma-cli completion bashzadarma-cli completion zshzadarma-cli completion fishzadarma-cli completion powershell
Pre-generated scripts are available in completions/.
zadarma-cli --output json phone listAI agents should use the SKILL.md file in this repository for CLI usage guidelines and best practices.
https://zadarma.com/en/support/api/
MIT