# `smallforce calls phone-numbers buy`

Purchase a phone number; the service checks and charges credits

This page is generated from the same Commander definition shipped in SmallForce CLI 0.1.8. Run `smallforce calls phone-numbers buy --help` locally to view the same reference for your installed version.

## Complete command help

```text
Usage: smallforce calls phone-numbers buy [options]

Purchase a phone number; the service checks and charges credits

Options:
  --api-key <key>          SmallForce API key, or set SMALLFORCE_API_KEY
  --backend-url <url>      SmallForce backend URL, or set SMALLFORCE_BACKEND_URL
  --json                   Print stable machine-readable JSON
  --text                   Print human-readable text
  --format <format>        Output format: text or json
  --input <json>           Full settings as a JSON object; explicit flags take precedence
  --input-file <path>      Read settings JSON from a file, or - for stdin
  --phone-number <number>  E.164 phone number returned by search
  --purchase-id <uuid>     Purchase UUID; reuse it for every retry of this purchase
  --assistant-id <id>      Voice assistant to attach
  --friendly-name <name>   Display name
  --country-code <code>    Two-letter country code
  -h, --help               display help for command
```

## Related reference

- [`smallforce calls phone-numbers`](/docs/cli/commands/calls/phone-numbers): Parent command and related operations.
- [CLI installation and authentication](/docs/cli/getting-started): Install the CLI and configure an API key.
- [CLI JSON output](/docs/cli/json-output): Use stable machine-readable output in scripts and agents.
