> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.talkif.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.talkif.ai/_mcp/server.

# Buy a number

> Search and buy a phone number inside Talkif — which countries, what it costs, how monthly rental works, what happens when it can't be paid, and how to release a number.

The simplest way to get a line is to buy one from Talkif. The number is provisioned on Talkif's own carrier, appears in your account within seconds, and needs no configuration beyond connecting a flow. It can answer inbound calls and place outbound ones, and it renews monthly from your balance until you release it.

## What you're buying

A **local number** in a supported country, with the capabilities that number type carries — every purchasable number has **voice**; many also have **SMS** and **MMS**, which Talkif shows but doesn't use for calling. The monthly price depends on the country and number type; the search results show it per number before you commit.

| Fee          | Amount          |
| ------------ | --------------- |
| **Purchase** | \$1.15 one-time |

Monthly cost varies by country and number type. Price shown is for US local numbers.

Some countries require an address or identity documentation for regulatory reasons; a number's `addressRequirements` says whether it needs one (`none`, `any`, `local`, `foreign`). Where a requirement exists, the carrier needs that documentation on file before the purchase goes through — contact support before buying in that country.

Per-minute call charges are separate from rental and are the same for every Talkif number regardless of country: see [Credits and pricing](/concepts/credits-and-pricing#telephony).

## Paying for it

Two rules that surprise people:

* **Purchase and rental come only from purchased or subscription balance.** Bonus and promotional credit — including the welcome credit — never pay for a number. Top up first.
* **Rental renews monthly, automatically**, from the day of purchase, against the same balance. The number's `monthlyCost` and `billingStatus` are on the record.

#### What happens when rental can't be paid

The number's billing status moves to **`past_due`**. Calls keep working. You have a **7-day grace period** to top up; the renewal is retried on each billing run during that window. If it still can't be paid at the end of the grace period, the number is **`suspended`**: it stops taking and placing calls, and you're notified again. Topping up reactivates it — the number stays yours; it isn't released.

#### Billing statuses

**`active`** `billingStatus`

Rental is paid up.

---

**`processing`** `billingStatus`

A renewal charge is in progress.

---

**`past_due`** `billingStatus`

Renewal failed for insufficient balance; inside the grace period. Calls still work.

---

**`suspended`** `billingStatus`

Grace period elapsed unpaid. No calls until the balance covers rental.

---

## Buying

#### Dashboard

#### Open Phone & WhatsApp → Purchase

Pick a country from the list of those available for purchase.

#### Search

Filter by area code, city, state, ZIP, or a digit pattern (`555%` for a prefix, `%1234` for a suffix). Tick **Exclude address-required numbers** to skip numbers that need regulatory paperwork. Each search returns a fresh random batch from the carrier's inventory; search again to see more. Results show the formatted number, capabilities and monthly price.

#### Confirm

Optionally give it a friendly name ("Support line"). The purchase charge is taken immediately and the number is provisioned — it appears in your list as **Active**.

#### Connect a flow

Until a published flow is connected, inbound calls are answered busy. See [Inbound and outbound routing](/telephony/inbound-and-outbound-routing).

#### API

Purchases go through the platform's **system provider** — list providers and take the one with `isSystemProvider: true`.

### Request

GET [https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries](https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries)

```curl
curl -G https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d providerId=providerId
```

```typescript
import { TalkifClient } from "@talkif/sdk";

async function main() {
    const client = new TalkifClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.phoneNumbers.listAvailableCountries({
        providerId: "providerId",
    });
}
main();

```

```python
import requests

url = "https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries"

querystring = {"providerId":"providerId"}

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.talkif.ai/api/v1/phone/numbers/twilio/available-countries?providerId=providerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Request

GET [https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing](https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing)

```curl
curl -G https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing \
     -H "Authorization: Bearer <token>" \
     -d countryCode=countryCode \
     -d providerId=providerId
```

```typescript
import { TalkifClient } from "@talkif/sdk";

async function main() {
    const client = new TalkifClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.phoneNumbers.getPricing({
        countryCode: "countryCode",
        providerId: "providerId",
    });
}
main();

```

```python
import requests

url = "https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing"

querystring = {"countryCode":"countryCode","providerId":"providerId"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.talkif.ai/api/v1/phone/numbers/twilio/pricing?countryCode=countryCode&providerId=providerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Request

GET [https://api.talkif.ai/api/v1/phone/numbers/twilio/available](https://api.talkif.ai/api/v1/phone/numbers/twilio/available)

```curl
curl -G https://api.talkif.ai/api/v1/phone/numbers/twilio/available \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d countryCode=countryCode \
     -d providerId=providerId
```

```typescript
import { TalkifClient } from "@talkif/sdk";

async function main() {
    const client = new TalkifClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.phoneNumbers.listAvailableNumbers({
        countryCode: "countryCode",
        providerId: "providerId",
    });
}
main();

```

```python
import requests

url = "https://api.talkif.ai/api/v1/phone/numbers/twilio/available"

querystring = {"countryCode":"countryCode","providerId":"providerId"}

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.talkif.ai/api/v1/phone/numbers/twilio/available?countryCode=countryCode&providerId=providerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Request

POST [https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase](https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase)

```curl
curl -X POST https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "phoneNumber": "+15551234567",
  "providerId": "550e8400-e29b-41d4-a716-446655440000"
}'
```

```typescript
import { TalkifClient } from "@talkif/sdk";

async function main() {
    const client = new TalkifClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.phoneNumbers.purchasePhoneNumber({
        phoneNumber: "+15551234567",
        providerId: "550e8400-e29b-41d4-a716-446655440000",
    });
}
main();

```

```python
import requests

url = "https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase"

payload = {
    "phoneNumber": "+15551234567",
    "providerId": "550e8400-e29b-41d4-a716-446655440000"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase"

	payload := strings.NewReader("{\n  \"phoneNumber\": \"+15551234567\",\n  \"providerId\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"phoneNumber\": \"+15551234567\",\n  \"providerId\": \"550e8400-e29b-41d4-a716-446655440000\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"phoneNumber\": \"+15551234567\",\n  \"providerId\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase', [
  'body' => '{
  "phoneNumber": "+15551234567",
  "providerId": "550e8400-e29b-41d4-a716-446655440000"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"phoneNumber\": \"+15551234567\",\n  \"providerId\": \"550e8400-e29b-41d4-a716-446655440000\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "phoneNumber": "+15551234567",
  "providerId": "550e8400-e29b-41d4-a716-446655440000"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.talkif.ai/api/v1/phone/numbers/twilio/purchase")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response is the new number's record, including its `id` for [`PATCH …/connect-flow`](/api-reference/phone-numbers/connect-flow).

## Releasing a number

Releasing gives the number back to the carrier and stops rental. It's permanent — a released number can't be recovered by you, and may later be issued to someone else. From the number's page, or [`DELETE /phone/numbers/{id}`](/api-reference/phone-numbers/release-phone-number).

Two guards:

* A number that's the **caller ID for a Meta Lead Ads form mapping** can't be released while the mapping exists — releasing it would silently stop calling new leads. Remove the mapping first.
* Releasing is idempotent: releasing an already-released number succeeds without effect.

There's no refund for the remainder of a rental period.

## Next

#### [Inbound and outbound routing](/telephony/inbound-and-outbound-routing)

Connect the number to a flow and use it for outbound calls.

#### [Bring your own SIP trunk](/telephony/bring-your-own-sip-trunk)

Keep the numbers you already have instead.