List available toll free numbers

For more information about Bandwidth’s toll free phone numbers, see the FAQ. To learn more about MMS on toll-free numbers, see the FAQ.

Request URL

GEThttps://api.catapult.inetwork.com/v1/availableNumbers/tollFree?<queryParams>


Supported Parameters

Parameter Description Mandatory
quantity The maximum number of numbers to return (default 10, maximum 5000). No
pattern A number pattern that may include letters, digits, and the following wildcard characters:
- ? : matches any single digit
- * : matches zero or more digits
Don’t forget to encode wildcard characters in the requested URL.
No

Example 1 of 1: Search and allocate tollFree number

To find up to two available toll free numbers that match the pattern "2?9", make the following request:

curl -v -X GET  https://api.catapult.inetwork.com/v1/availableNumbers/tollFree?pattern=*2%3F9*&quantity=2 \
  -u {token}:{secret} \
  -H "Content-type: application/json" \
//Promise
client.AvailableNumber.search("tollFree", {
    quantity : 2,
    pattern: "*2?9*"
 })
.then(function (numbers) {
    console.log(numbers)
});

// Callback
client.AvailableNumber.search("tollFree", {
    quantity : 2,
    pattern: "*2?9*" },
    function (err, numbers) {
        if(err) {
            console.log(err);
        }
        else {
            console.log(numbers);
        }
    });
var results = await client.AvailableNumber.SearchTollFreeAsync(
  new TollFreeNumberQuery{ Pattern = "*2?9*", Quantity = 2}
);
var first = results.First();
Console.WriteLine($"{first.Number} - {first.Price}");
// +1234567890 - 0.1
results = AvailableNumber.search_toll_free(client, {
  :pattern => "*2?9*",
  :quantity => 2
})
first_result = results.next
first_number = first_result[:number]

The above command returns JSON structured like this:

[
  {
    "number":"{number1}",
    "nationalNumber":"{national_number1}",
    "patternMatch":"        2  9  ",
    "price":"2.00"
  },
  {
    "number":"{number2}",
    "nationalNumber":"{national_number2}",
    "patternMatch":"          2 9 ",
    "price":"2.00"
  }
]

results matching ""

    No results matching ""