Buscar números de telefone disponíveis
curl --request GET \
--url https://suasofia.online/api/user/phone-numbers/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://suasofia.online/api/user/phone-numbers/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suasofia.online/api/user/phone-numbers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://suasofia.online/api/user/phone-numbers/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://suasofia.online/api/user/phone-numbers/search"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://suasofia.online/api/user/phone-numbers/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/phone-numbers/search")
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{
"data": [
{
"phone_number": "+14155551234",
"phone_number_formatted": "+1 415-555-1234",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": true
},
{
"phone_number": "+14155555678",
"phone_number_formatted": "+1 415-555-5678",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": false
}
]
}
{
"data": []
}
Números de Telefone
Buscar números de telefone disponíveis
Buscar números de telefone disponíveis que podem ser comprados
GET
/
user
/
phone-numbers
/
search
Buscar números de telefone disponíveis
curl --request GET \
--url https://suasofia.online/api/user/phone-numbers/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://suasofia.online/api/user/phone-numbers/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suasofia.online/api/user/phone-numbers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://suasofia.online/api/user/phone-numbers/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://suasofia.online/api/user/phone-numbers/search"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://suasofia.online/api/user/phone-numbers/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/phone-numbers/search")
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{
"data": [
{
"phone_number": "+14155551234",
"phone_number_formatted": "+1 415-555-1234",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": true
},
{
"phone_number": "+14155555678",
"phone_number_formatted": "+1 415-555-5678",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": false
}
]
}
{
"data": []
}
Este endpoint permite buscar números de telefone disponíveis do nosso provedor. Use os resultados para encontrar um número que deseja comprar.
Parâmetros de Consulta
string
default:"US"
O código de país ISO 3166-1 alpha-2 para buscar (ex.: US, GB, AU, CA)
string
Filtrar números de telefone que contêm dígitos específicos (apenas caracteres numéricos, máximo de 10 dígitos)
Resposta
array
Array de números de telefone disponíveis
Show propriedades do número disponível
Show propriedades do número disponível
string
O número de telefone no formato E.164
string
O número de telefone formatado para exibição
string
O código de país ISO
number
Preço de aluguel mensal em USD
string
O ID de preço do Stripe para faturamento
string
Requisitos de endereço para este número:
none, local, foreign, ou inventoryboolean
Se o número suporta SMS
{
"data": [
{
"phone_number": "+14155551234",
"phone_number_formatted": "+1 415-555-1234",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": true
},
{
"phone_number": "+14155555678",
"phone_number_formatted": "+1 415-555-5678",
"country_code": "US",
"price": 3.99,
"stripe_price_id": "price_1PkA4dBXoZOzqQuAsvGvVJTZ",
"address_requirements": "none",
"sms_capable": false
}
]
}
{
"data": []
}
Países Suportados
| País | Código |
|---|---|
| Estados Unidos | US |
| Canadá | CA |
| Reino Unido | GB |
| Austrália | AU |
| Israel | IL |
| Polônia | PL |
| Finlândia | FI |
| Holanda | NL |
| Dinamarca | DK |
| Itália | IT |
⌘I

