> ## 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.

# Connect a number to your agent

> Create an application that points at your answer URL and attach a Plivo number to it.

A Plivo number does not hold URLs itself. It is attached to an **application**, and the application holds the answer URL (which returns your `<Stream>` XML), the fallback URL and the hangup URL. So going live is two commands:

```sh theme={null}
plivo account applications create --app-name my-agent \
  --answer-url https://YOUR-HOST/plivo/answer --answer-method POST -o json
plivo numbers update 14155551234 --app-id <app_id from above> --dry-run   # preview: shows the current binding
plivo numbers update 14155551234 --app-id <app_id from above> --yes
```

To move to a new server later, update the application's URLs. The number does not change. `plivo numbers update` re-attaches a number; preview it with `--dry-run` and note the previous `app_id` so you can roll back. Searching, buying and compliance for numbers are on the [Numbers](/docs/cli/apis/numbers) page.

## Applications

An application holds the webhook URLs Plivo calls for a number. Create one, attach numbers to it with `plivo numbers update --app-id`, and update its URLs without touching the number.

Manage Plivo applications (voice/messaging webhooks)

| Command                             | What it does                           |
| ----------------------------------- | -------------------------------------- |
| `plivo account applications create` | Create a new application               |
| `plivo account applications delete` | Delete an application (requires --yes) |
| `plivo account applications get`    | Get application details                |
| `plivo account applications list`   | List applications                      |
| `plivo account applications update` | Update an application                  |

<AccordionGroup>
  <Accordion title="plivo account applications create">
    **Command:**

    ```bash theme={null}
    plivo account applications create [flags]
    ```

    **Flags**

    * `--answer-method <string>`: GET|POST (default "POST")
    * `--answer-url <string>`: webhook for incoming calls (required)
    * `--app-name <string>`: application name (required)
    * `--default-number-app`: set as default for new numbers
    * `--fallback-answer-url <string>`: backup webhook if answer-url fails
    * `--hangup-url <string>`: webhook for call hangup
    * `--log-incoming-messages`: log inbound SMS content (default true)
    * `--message-url <string>`: webhook for inbound SMS
  </Accordion>

  <Accordion title="plivo account applications delete">
    **Command:**

    ```bash theme={null}
    plivo account applications delete <app_id> [flags]
    ```

    **Flags**

    * `--cascade`: also detach numbers/endpoints
  </Accordion>

  <Accordion title="plivo account applications get">
    **Command:**

    ```bash theme={null}
    plivo account applications get <app_id>
    ```
  </Accordion>

  <Accordion title="plivo account applications list">
    **Command:**

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

    **Flags**

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

  <Accordion title="plivo account applications update">
    **Command:**

    ```bash theme={null}
    plivo account applications update <app_id> [flags]
    ```

    **Flags**

    * `--answer-method <string>`: GET|POST
    * `--answer-url <string>`: new answer URL
    * `--app-name <string>`: new application name
    * `--hangup-url <string>`: new hangup URL
    * `--message-url <string>`: new message URL
  </Accordion>
</AccordionGroup>
