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

# roark phone-number create

> Buy a phone number

Buys a number from the carrier for this project. Free inside the plan allowance; past it, the first month of rent is charged now and monthly after that.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark phone-number create [options]
```

> [!NOTE]
>
> Calls `POST /v1/phone-number`

## Options

**--e164** `string` *required*

The number to buy, in E.164 format, from a search result.

**--name** `string`

A label for the number.

**--agent-id** `string`

The agent to assign the number to.

**--expect-free** `switch`

Whether you expect this number to be free (from the allowance). The purchase is refused with 409 if that has changed since you checked.

**--expect-monthly-rent-micros** `integer`

The monthly rent you expect for a paid number, in micros (from the allowance). The purchase is refused with 409 if that has changed since you checked.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark phone-number create --e164 <value>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.