> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Numbers

> Search, buy, attach and release phone numbers; compliance applications (including India KYC); number masking.

Buying a number spends money and needs `--yes`. In India a number can only be rented (and used for calls) once a compliance application is `accepted`; see the compliance commands below.

## Phone numbers

Search available numbers, buy one (requires `--yes`), attach it to an application, set CNAM, or release it.

Manage account phone numbers

| Command                 | What it does                                                                   |
| ----------------------- | ------------------------------------------------------------------------------ |
| `plivo numbers buy`     | Rent a phone number (requires --yes; spends money)                             |
| `plivo numbers cnam`    | Caller-ID Name (CNAM) lookup for a US/CA number (spends money: requires --yes) |
| `plivo numbers get`     | Get details of a rented number                                                 |
| `plivo numbers list`    | List numbers rented to your account                                            |
| `plivo numbers release` | Release a rented number (requires --yes; stops monthly billing)                |
| `plivo numbers search`  | Search available numbers to rent                                               |
| `plivo numbers update`  | Update settings on a rented number                                             |

<AccordionGroup>
  <Accordion title="plivo numbers buy">
    **Command:**

    ```bash theme={null}
    plivo numbers buy <number> [flags]
    ```

    **Flags**

    * `--app-id <string>`: auto-attach to this application after purchase
  </Accordion>

  <Accordion title="plivo numbers cnam">
    **Command:**

    ```bash theme={null}
    plivo numbers cnam <number>
    ```
  </Accordion>

  <Accordion title="plivo numbers get">
    **Command:**

    ```bash theme={null}
    plivo numbers get <number>
    ```
  </Accordion>

  <Accordion title="plivo numbers list">
    **Command:**

    ```bash theme={null}
    plivo numbers list [flags]
    ```

    **Flags**

    * `--alias <string>`: filter by alias
    * `--limit <int>`: results per page (max 20) (default 20)
    * `--offset <int>`: pagination offset
    * `--services <string>`: filter by services: voice|sms|mms|voice,sms ...
    * `--starts-with <string>`: prefix filter on E.164
    * `--subaccount <string>`: filter by subaccount auth\_id
    * `--type <string>`: filter by type: local|tollfree|mobile|fixed
  </Accordion>

  <Accordion title="plivo numbers release">
    **Command:**

    ```bash theme={null}
    plivo numbers release <number>
    ```
  </Accordion>

  <Accordion title="plivo numbers search">
    **Command:**

    ```bash theme={null}
    plivo numbers search [flags]
    ```

    **Flags**

    * `--country <string>`: ISO country code, e.g. US (required)
    * `--limit <int>`: results per page (default 20)
    * `--offset <int>`: pagination offset
    * `--pattern <string>`: digit pattern
    * `--region <string>`: region filter
    * `--type <string>`: local|tollfree|mobile|fixed
  </Accordion>

  <Accordion title="plivo numbers update">
    **Command:**

    ```bash theme={null}
    plivo numbers update <number> [flags]
    ```

    **Flags**

    * `--alias <string>`: set alias
    * `--app-id <string>`: associate an application
    * `--subaccount <string>`: move under subaccount
  </Accordion>
</AccordionGroup>

## Number compliance

Look up what documents a country and number type require, create and manage compliance applications (with document upload), and link numbers to them.

Regulatory compliance for phone numbers (requirements, applications, linking)

| Command                                 | What it does                                                         |
| --------------------------------------- | -------------------------------------------------------------------- |
| `plivo numbers compliance create`       | Create + submit a compliance application (multipart; auto-submits)   |
| `plivo numbers compliance delete`       | Delete a compliance application (requires --yes)                     |
| `plivo numbers compliance get`          | Get a compliance application by ID                                   |
| `plivo numbers compliance link`         | Bulk-link numbers to accepted compliance applications                |
| `plivo numbers compliance list`         | List compliance applications                                         |
| `plivo numbers compliance requirements` | List documents/fields required to activate a regulated number        |
| `plivo numbers compliance update`       | Update a rejected compliance application (multipart; auto-resubmits) |

<AccordionGroup>
  <Accordion title="plivo numbers compliance create">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance create [flags]
    ```

    **Flags**

    * `--data <string>`: application JSON; inline or @file.json (required)
    * `--file <stringArray>`: document upload as field=path, e.g. documents\[0].file=@id.pdf (repeatable)

    **Examples**

    ```bash theme={null}
      plivo numbers compliance create \
        --data @app.json \
        --file documents[0].file=@passport.pdf \
        --file documents[1].file=@address-proof.pdf
    ```
  </Accordion>

  <Accordion title="plivo numbers compliance delete">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance delete <compliance_id>
    ```
  </Accordion>

  <Accordion title="plivo numbers compliance get">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance get <compliance_id> [flags]
    ```

    **Flags**

    * `--expand <string>`: comma-separated: end\_user,documents,linked\_numbers

    **Examples**

    ```bash theme={null}
      plivo numbers compliance get <compliance_id> --expand end_user,documents,linked_numbers
    ```
  </Accordion>

  <Accordion title="plivo numbers compliance link">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance link [flags]
    ```

    **Flags**

    * `--data <string>`: full link JSON body; inline or @file.json (alternative to --link)
    * `--link <stringArray>`: number=compliance\_application\_id (repeatable)

    **Examples**

    ```bash theme={null}
      plivo numbers compliance link --link +14155551234=<compliance_id> --link +14155556789=<compliance_id>
    ```
  </Accordion>

  <Accordion title="plivo numbers compliance list">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance list [flags]
    ```

    **Flags**

    * `--alias <string>`: filter by alias
    * `--country <string>`: filter by ISO country code
    * `--limit <int>`: results per page (default 20)
    * `--number-type <string>`: filter by number type
    * `--offset <int>`: pagination offset
    * `--status <string>`: filter by status
    * `--user-type <string>`: filter by user type
  </Accordion>

  <Accordion title="plivo numbers compliance requirements">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance requirements [flags]
    ```

    **Flags**

    * `--country <string>`: ISO country code, e.g. US (required)
    * `--number-type <string>`: local|mobile|tollfree (required)
    * `--user-type <string>`: individual|business (required)

    **Examples**

    ```bash theme={null}
      plivo numbers compliance requirements --country US --number-type local --user-type business
    ```
  </Accordion>

  <Accordion title="plivo numbers compliance update">
    **Command:**

    ```bash theme={null}
    plivo numbers compliance update <compliance_id> [flags]
    ```

    **Flags**

    * `--data <string>`: updated application JSON; inline or @file.json (required)
    * `--file <stringArray>`: document upload as field=path (repeatable; replaces all documents)

    **Examples**

    ```bash theme={null}
      plivo numbers compliance update <compliance_id> --data @fixed.json --file documents[0].file=@passport.pdf
    ```
  </Accordion>
</AccordionGroup>

## Number masking

Create, list, fetch, and delete number-masking sessions.

Number-Masking sessions (privacy-preserving call/SMS bridge)

| Command                                 | What it does                                            |
| --------------------------------------- | ------------------------------------------------------- |
| `plivo numbers masking sessions`        | Manage number-masking sessions                          |
| `plivo numbers masking sessions create` | Create a masking session (spends money: requires --yes) |
| `plivo numbers masking sessions delete` | End a masking session (requires --yes)                  |
| `plivo numbers masking sessions get`    | Get a masking session by uuid                           |
| `plivo numbers masking sessions list`   | List masking sessions                                   |

<AccordionGroup>
  <Accordion title="plivo numbers masking sessions">
    **Command:**

    ```bash theme={null}
    plivo numbers masking sessions
    ```
  </Accordion>

  <Accordion title="plivo numbers masking sessions create">
    **Command:**

    ```bash theme={null}
    plivo numbers masking sessions create [flags]
    ```

    **Flags**

    * `--call-time-limit <int>`: max per-call duration in seconds
    * `--first-party <string>`: first party E.164 (required)
    * `--mode <string>`: voice|sms|both (default "both")
    * `--record`: record calls in this session
    * `--second-party <string>`: second party E.164 (required)
    * `--session-expiry <int>`: session lifetime in seconds
    * `--virtual-number <string>`: virtual number to use (else allocates from pool)
  </Accordion>

  <Accordion title="plivo numbers masking sessions delete">
    **Command:**

    ```bash theme={null}
    plivo numbers masking sessions delete <session_uuid>
    ```
  </Accordion>

  <Accordion title="plivo numbers masking sessions get">
    **Command:**

    ```bash theme={null}
    plivo numbers masking sessions get <session_uuid>
    ```
  </Accordion>

  <Accordion title="plivo numbers masking sessions list">
    **Command:**

    ```bash theme={null}
    plivo numbers masking sessions list [flags]
    ```

    **Flags**

    * `--limit <int>`: results per page (default 20)
    * `--offset <int>`: pagination offset
  </Accordion>
</AccordionGroup>
