Skip to main content

AI agents

Command-line interface

The official kawaa package on npm ships a non-interactive CLI built for scripts, CI/CD pipelines and terminal-based AI coding agents. Every command writes structured data to stdout, keeps diagnostics and JSON errors on stderr, and exits with a deterministic status code.

Install and authenticate

Run npx kawaa directly with Node.js 18 or later, or install the package globally. Set KAWAA_API_KEY in the environment so secrets stay out of shell history and process listings. Issue a dedicated scoped agent key in Settings → API keys.

Bash
npm install -g kawaa

export KAWAA_API_KEY=ev_your_key_here

# Read plan, balance and rate limits (free)
kawaa account

# Verify one address (1 credit fresh, 0.5 cached)
kawaa verify someone@example.com

If your agent supports the Model Context Protocol directly (Claude Code, Codex, Cursor, GitHub Copilot, Grok, Antigravity or OpenClaw / Clawbot), you can also connect it to the hosted MCP endpoint without installing anything locally: see MCP server for AI agents.

Commands

The current release on npm is kawaa@0.5.5.

Kawaa CLI commands and credit costs
CommandSinceCostWhat it does
kawaa verify <email>0.2.01 credit (0.5 cached)Verify one address and print the JSON verdict.
kawaa verify-batch [email...]0.2.01 per unique address (0.5 cached)Submit a list from arguments, --file <path>, or --file - (stdin). Pass --wait to poll until settled; --max-credits <n> is added in 0.5.4.
kawaa job <job_id>0.2.0FreeRead job progress, verdict counts and billing settlement. Exits 10 while running or settling.
kawaa cancel-job <job_id>0.5.4FreeStop a running batch or file job and refund unchecked addresses.
kawaa jobs0.5.4FreeList verification jobs newest first (--limit, --status, --offset).
kawaa results <job_id>0.2.0FreeDownload verified rows as JSON or raw CSV (--format json|csv).
kawaa account0.2.0FreeRead plan, credit balance, allowance basis and per-key rate limits.
kawaa usage0.5.4FreeRead allowance usage and retention coverage window.
kawaa find0.2.05 creditsFind and verify a business address from --first, --last and --domain (Starter plan and up).
kawaa check-domain <domain>0.5.410 credits (0 cached)Check SPF, DKIM, DMARC, MX and blocklists (requires deliverability:write).

Batch workflows, stdin and spend caps

Pass --file - to verify-batch to read newline-separated addresses from standard input, and --wait to poll until the job settles. Unrecognised flags exit 2 before sending anything. With kawaa@0.5.5, set --max-credits <n> to cap the charge for a batch. If the maximum estimate exceeds the limit, the command sends no request and exits 6 with MAX_CREDITS_EXCEEDED and nothing_charged: true. The estimate may include internationalized addresses your version of Node.js cannot normalize.

Run kawaa cancel-job <job_id> to stop a running batch. After cancellation, kawaa job <job_id> shows when the refund for unchecked addresses has settled.

Bash
# Read addresses from stdin, wait for completion, and export verified CSV rows cleanly to a file:
cat leads.txt | kawaa verify-batch --file - --wait > job.json

JOB_ID=$(node -e 'console.log(JSON.parse(require("fs").readFileSync("job.json", "utf8")).jobId)')
kawaa results "$JOB_ID" --format csv > verified.csv

Output, errors and safe retries

Redirecting stdout to a file always produces valid JSON (or raw CSV for kawaa results <job_id> --format csv). On any non-zero exit code, stderr contains a single structured JSON error object with kind, message, retryable, next_step and exit_code, plus a code when there is one: the API’s error code, or MAX_CREDITS_EXCEEDED when --max-credits stopped the command. Pass --compact for single-line JSON output.

Idempotency keys on every paid command

verify, verify-batch, find and check-domain send an Idempotency-Key automatically (or use the one you pass via --idempotency-key) and print it as idempotencyKey on stdout and idempotency_key on ambiguous errors. Reusing that key after a timeout or 5xx replays the original charge instead of billing twice.

Exit codes

Kawaa CLI exit codes
ExitKindMeaning
0okCompleted cleanly.
1unknownFailed in a way the CLI could not classify, or a terminal job produced no clean result set.
2usageInvalid flag or missing argument. Nothing was sent and nothing was charged.
3authentication_requiredMissing or rejected API key.
4permission_deniedValid credential lacking the required scope (check error.required_scopes).
5payment_requiredInsufficient credits.
6invalid_requestRefused input or --max-credits ceiling exceeded (MAX_CREDITS_EXCEEDED, nothing charged).
7not_foundNo such job or resource.
8rate_limitedRate limited; wait error.retry_after_seconds and retry.
9service_unavailableTemporary upstream error or timeout; retry with the printed --idempotency-key.
10in_progressWork is still running or settling its refund. Poll kawaa job <job_id>; do not resubmit.
11plan_upgrade_requiredFeature requires a higher plan; changing keys will not help.