Pricing: Voice Resource

The Pricing Voice resource provides a simple API to pull real-time, account-specific pricing for Twilio's Programmable Voice product.

Prices can be retrieved at a country level via the Pricing Voice Countries resource or for a specific phone number via the Pricing Voice Numbers resource.

You may also wish to check out our Pricing API resources for Twilio's Messaging and Phone Number products.

Looking for details on pricing for Twilio products? Check out Twilio's pricing page.

Base URL

All URLs in the reference documentation use the following base URL:

https://pricing.twilio.com/v1

Authentication

HTTP requests to the REST API are protected with HTTP Basic authentication. To learn more about how Twilio handles authentication, please refer to our security documentation. In short, you will use your Twilio account SID as the username and your auth token as the password for HTTP Basic authentication.

curl -G https://pricing.twilio.com/v1/Voice/Countries/US \
    -u '[YOUR ACCOUNT SID]:[YOUR AUTH TOKEN]'

You can find your account SID and auth token on your dashboard.

Pricing Voice Country Instance Resource

This resource represents prices to make voice calls to phone numbers in a given country, organized by phone number prefix (OutboundPrefixPrices), and the prices to receive voice calls on Twilio phone numbers in this country, organized by phone number type (InboundCallPrices).

Resource URL

https://pricing.twilio.com/v1/Voice/Countries/{Country}

where {Country} is the ISO 3166-1 alpha-2 format country code

Resource Properties

A Pricing Voice Country resource is represented by the following properties:

Name Description
country

Name of the country (not PII)

inbound_call_price

List of InboundCallPrice records (not PII)

iso_country

The ISO country code (not PII)

outbound_call_price

List of OutboundPrefixPrice records (not PII)

price_unit

The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). (not PII)

OutboundPrefixPrice record

Property Description
Prefixes Set of phone number prefixes for the requested country with the same pricing
FriendlyName Descriptive text for this set of prefixes
BasePrice The retail price per minute to make a call to numbers matching this prefix list
CurrentPrice The current price per minute (which accounts for any volume or custom price discounts) to make a call to numbers matching this prefix list.

InboundCallPrice record

Property Description
NumberType The phone number type, either local, mobile, national, or toll free
BasePrice The retail price per minute to receive a call to this phone number type.
CurrentPrice The current price per minute (which accounts for any volume or custom price discounts) to receive a call to this phone number type.

Example

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.countries('EE').get((err, country) => {
  const cpList = country.inboundCallPrices;
  for (let i = 0; i < cpList.length; i++) {
    console.log(cpList[i].numberType + ' ' + cpList[i].currentPrice + '\n');
  }
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice
  .countries('EE')
  .fetch()
  .then(country => {
    country.inboundCallPrices.forEach(price => {
      console.log(`${price.number_type} ${price.current_price}`);
    });
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // Look up pricing information for the UK
    var country = pricingClient.GetVoiceCountry("EE");
    // Print inbound call pricing for this country
    foreach (InboundCallPrice p in country.InboundCallPrices)
    {
        Console.WriteLine(p.NumberType);
        Console.WriteLine(p.CurrentPrice);
    } 
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

$country = $client->voiceCountries->get("EE");

foreach ($country->inbound_call_prices as $p) {
    echo $p->number_type . " " . $p->current_price . "\n";
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@country = @client.voice.countries.get('EE')
@country.inbound_call_prices.each do |p|
  puts "#{p['number_type']} #{p['current_price']}"
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var country = CountryResource.Fetch("EE");

        foreach (var price in country.InboundCallPrices)
        {
            Console.WriteLine(price.CurrentPrice);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$country = $client->pricing->voice->countries("EE")->fetch();

foreach ($country->inboundCallPrices as $p) {
    echo "{$p["number_type"]} {$p["current_price"]}\n";
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

country = client.voice.countries.get("EE")

for p in country.inbound_call_prices:
    print("{} {}".format(p['number_type'], p['current_price']))
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

country = @client.pricing.voice.countries('EE')
country.fetch.inbound_call_prices.each do |p|
  puts "#{p['number_type']} #{p['current_price']}"
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.pricing.VoiceCountry;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get Twilio Voice pricing information for a specific country
		VoiceCountry c = client.getVoiceCountry("EE");

		for (VoiceCountry.InboundCallPrice p : c.getInboundCallPrices()) {
			// For each call pricing category, print number type and
			// current (reflecting any discounts your account has) price.
			System.out.println(p.getNumberType().toString());
			System.out.println(p.getCurrentPrice().toString());
		}
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

country = client.pricing \
                .voice \
                .countries("EE") \
                .fetch()

for p in country.inbound_call_prices:
    print("{} {}".format(p['number_type'], p['current_price']))
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.pricing.v1.voice.Country;
import com.twilio.type.InboundCallPrice;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get Twilio Voice pricing information for a specific country
    Country voiceCountry = Country.fetcher("EE").fetch();

    for (InboundCallPrice price : voiceCountry.getInboundCallPrices()) {
      // For each call pricing category, print number type and
      // current (reflecting any discounts your account has) price.
      System.out.println(price.getType());
      System.out.println(price.getCurrentPrice());
    }
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Countries/EE \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "country" : "Estonia",
    "iso_country": "EE",
    "outbound_prefix_prices": [
	{
            "prefixes": ["37240", "37270", "37281", "37282"],
            "friendly_name": "Programmable Outbound Minute - Estonia - Other",
            "base_price": "0.465",
            "current_price": "0.465"
        },
	{
            "prefixes": ["3725"],
            "friendly_name": "Programmable Outbound Minute - Estonia - Mobile",
            "base_price": "0.0575",
            "current_price": "0.0575"
        },
        {
            "prefixes": ["372"],
            "friendly_name": "Programmable Outbound Minute - Estonia",
            "base_price": "0.033",
            "current_price": "0.030"
        },
    ],
    "inbound_call_prices": [
        {
            "number_type": "national",
            "base_price": "0.0075",
            "current_price": "0.0070"
        }
    ],
    "price_unit": "USD",
    "url" : "https://pricing.twilio.com/v1/Voice/Countries/EE"
}
Find Voice Prices for Estonia

Pricing Voice Country List Resource

Resource URL

https://pricing.twilio.com/v1/Voice/Countries

HTTP GET

Returns a list of countries where Twilio voice services are available and the corresponding URL for retrieving the country specific voice prices. This list includes paging information.

Example

Retrieve a list of countries where Twilio voice services are available.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.countries.list((error, response) => {
  const cList = response.countries;
  for (let i = 0; i < cList.length; i++) {
    console.log(cList[i].isoCountry + '\n');
  }
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice.countries
  .list()
  .then(countries => {
    countries.forEach(country => {
      console.log(country.isoCountry);
    });
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // List countries where Twilio Phone Numbers are available
    var result = pricingClient.ListVoiceCountries();
    foreach (VoiceCountry c in result.Countries)
    {
        Console.WriteLine(c.IsoCountry);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

foreach ($client->voiceCountries as $c) {
    echo $c->iso_country . "\n";
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@countries = @client.voice.countries.list
@countries.each do |c|
  puts c.iso_country
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var countries = CountryResource.Read();

        foreach (var country in countries)
        {
            Console.WriteLine(country.IsoCountry);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$voiceCountries = $client->pricing->voice->countries->read();

foreach ($voiceCountries as $c) {
    echo $c->isoCountry . PHP_EOL;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

countries = client.voice.countries.list()

for c in countries:
    print(c.iso_country)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

countries = @client.pricing.voice.countries.list
countries.each do |c|
  puts c.iso_country
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.list.pricing.VoiceCountryList;
import com.twilio.sdk.resource.instance.pricing.VoiceCountry;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get a list of countries where Twilio Voice is available
		VoiceCountryList list = client.getVoiceCountries();

		for (VoiceCountry c : list.getPageData()) {
			System.out.println(c.getIsoCountry());
		}
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

voice_countries = client.pricing \
                        .voice \
                        .countries \
                        .list()

for country in voice_countries:
    print(country.iso_country)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.pricing.v1.voice.Country;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get a list of countries where Twilio Voice is available
    ResourceSet<Country> countries = Country.reader().read();

    for (Country country : countries) {
      System.out.println(country.getIsoCountry());
    }
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Countries \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "meta": {
        "page": 0,
        "page_size": 50,
        "first_page_url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=0",
        "next_page_url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=1&PageToken=DNDE",
        "key": "countries"
    },
    "countries": [
        {
            "country": "Andorra",
            "iso_country": "AD",
            "url": "https://pricing.twilio.com/v1/Voice/Countries/AD"
        },
        {
            "country": "United Arab Emirates",
            "iso_country": "AE",
            "url": "https://pricing.twilio.com/v1/Voice/Countries/AE"
        }
	...
     ]
}
List Countries with Voice Service

PricingVoice Number Instance Resource

This resource represents the prices to make voice calls to a given phone number (OutboundCallPrice) and the prices to receive voice calls to this Twilio phone number (InboundCallPrice). The origin of the call is not relevant to inbound or outbound voice pricing.

Resource URL

https://pricing.twilio.com/v1/Voice/Numbers/{Phone Number}

where {Phone Number} is the phone number in E.164 format

Resource Properties

Name Description
country

Name of the country (not PII)

inbound_call_price

See InboundCallPrice record (returned as null if the Phone Number provided is not a Twilio number owned by this account) (not PII)

iso_country

The ISO country code (not PII)

outbound_call_price

See OutboundCallPrice record (not PII)

price_unit

The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). (not PII)

OutboundCallPrice record

Property Description
BasePrice The retail price per minute to make a call to this number
CurrentPrice The current price per minute (which accounts for any volume or custom price discounts) to make a call to this number

Example

Retrieve voice prices for phone number +15108675310.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.numbers('+15108675310').get((err, number) => {
  console.log(number.outboundCallPrice.currentPrice);
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice
  .numbers('+15108675310')
  .fetch()
  .then(number => {
    console.log(number.outboundCallPrice.current_price);
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // Look up pricing information for calls to/from a specific number
    var number = pricingClient.GetVoiceNumber("+15108675310");
    Console.WriteLine(number.OutboundCallPrice.CurrentPrice);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

$number = $client->voiceNumbers->get("+15108675310");

echo $number->outbound_call_price->current_price . "\n";
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@number = @client.voice.numbers.get('+15108675310')
puts @number.outbound_call_price['current_price']
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;
using Twilio.Types;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var number = NumberResource.Fetch(new PhoneNumber("+15108675310"));

        Console.WriteLine(number.OutboundCallPrice.CurrentPrice);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$number = $client->pricing->voice->numbers("+15108675310")->fetch();

$number->outboundCallPrice["current_price"] . PHP_EOL;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

number = client.voice.numbers.get("+15108675310")

print(number.outbound_call_price['current_price'])
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

number = @client.pricing.voice.numbers('+15108675310')
puts number.fetch.outbound_call_price['current_price']
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.pricing.VoiceNumber;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get Twilio Voice pricing for calls to/from a specific number
		VoiceNumber n = client.getVoiceNumber("+15108675310");

		System.out.println(n.getOutboundCallPrice().getCurrentPrice().toString());
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

number = client.pricing \
               .voice \
               .numbers("+15108675310") \
               .fetch()

print(number.outbound_call_price['current_price'])
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.pricing.v1.voice.Number;
import com.twilio.type.PhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get Twilio Voice pricing for calls to/from a specific number
    Number voiceNumber = Number.fetcher(new PhoneNumber("+15108675310")).fetch();

    System.out.println(voiceNumber.getOutboundCallPrice().getCurrentPrice());
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Numbers/+15108675310 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "number": "+15108675310",
    "country": "United States",
    "iso_country" : "US",
    "outbound_call_price": {
        "base_price": "0.015",
        "current_price": "0.015"
    },
    "inbound_call_price": {
        "number_type" : null,
        "base_price" : null,
        "current_price" : null
    },
    "price_unit": "USD",
    "url": "https://pricing.twilio.com/v1/Voice/Numbers/+15108673509"
}
Get Voice Prices for Number

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Samples...
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.countries('EE').get((err, country) => {
  const cpList = country.inboundCallPrices;
  for (let i = 0; i < cpList.length; i++) {
    console.log(cpList[i].numberType + ' ' + cpList[i].currentPrice + '\n');
  }
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice
  .countries('EE')
  .fetch()
  .then(country => {
    country.inboundCallPrices.forEach(price => {
      console.log(`${price.number_type} ${price.current_price}`);
    });
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // Look up pricing information for the UK
    var country = pricingClient.GetVoiceCountry("EE");
    // Print inbound call pricing for this country
    foreach (InboundCallPrice p in country.InboundCallPrices)
    {
        Console.WriteLine(p.NumberType);
        Console.WriteLine(p.CurrentPrice);
    } 
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

$country = $client->voiceCountries->get("EE");

foreach ($country->inbound_call_prices as $p) {
    echo $p->number_type . " " . $p->current_price . "\n";
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@country = @client.voice.countries.get('EE')
@country.inbound_call_prices.each do |p|
  puts "#{p['number_type']} #{p['current_price']}"
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var country = CountryResource.Fetch("EE");

        foreach (var price in country.InboundCallPrices)
        {
            Console.WriteLine(price.CurrentPrice);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$country = $client->pricing->voice->countries("EE")->fetch();

foreach ($country->inboundCallPrices as $p) {
    echo "{$p["number_type"]} {$p["current_price"]}\n";
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

country = client.voice.countries.get("EE")

for p in country.inbound_call_prices:
    print("{} {}".format(p['number_type'], p['current_price']))
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

country = @client.pricing.voice.countries('EE')
country.fetch.inbound_call_prices.each do |p|
  puts "#{p['number_type']} #{p['current_price']}"
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.pricing.VoiceCountry;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get Twilio Voice pricing information for a specific country
		VoiceCountry c = client.getVoiceCountry("EE");

		for (VoiceCountry.InboundCallPrice p : c.getInboundCallPrices()) {
			// For each call pricing category, print number type and
			// current (reflecting any discounts your account has) price.
			System.out.println(p.getNumberType().toString());
			System.out.println(p.getCurrentPrice().toString());
		}
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

country = client.pricing \
                .voice \
                .countries("EE") \
                .fetch()

for p in country.inbound_call_prices:
    print("{} {}".format(p['number_type'], p['current_price']))
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.pricing.v1.voice.Country;
import com.twilio.type.InboundCallPrice;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get Twilio Voice pricing information for a specific country
    Country voiceCountry = Country.fetcher("EE").fetch();

    for (InboundCallPrice price : voiceCountry.getInboundCallPrices()) {
      // For each call pricing category, print number type and
      // current (reflecting any discounts your account has) price.
      System.out.println(price.getType());
      System.out.println(price.getCurrentPrice());
    }
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Countries/EE \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "country" : "Estonia",
    "iso_country": "EE",
    "outbound_prefix_prices": [
	{
            "prefixes": ["37240", "37270", "37281", "37282"],
            "friendly_name": "Programmable Outbound Minute - Estonia - Other",
            "base_price": "0.465",
            "current_price": "0.465"
        },
	{
            "prefixes": ["3725"],
            "friendly_name": "Programmable Outbound Minute - Estonia - Mobile",
            "base_price": "0.0575",
            "current_price": "0.0575"
        },
        {
            "prefixes": ["372"],
            "friendly_name": "Programmable Outbound Minute - Estonia",
            "base_price": "0.033",
            "current_price": "0.030"
        },
    ],
    "inbound_call_prices": [
        {
            "number_type": "national",
            "base_price": "0.0075",
            "current_price": "0.0070"
        }
    ],
    "price_unit": "USD",
    "url" : "https://pricing.twilio.com/v1/Voice/Countries/EE"
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.countries.list((error, response) => {
  const cList = response.countries;
  for (let i = 0; i < cList.length; i++) {
    console.log(cList[i].isoCountry + '\n');
  }
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice.countries
  .list()
  .then(countries => {
    countries.forEach(country => {
      console.log(country.isoCountry);
    });
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // List countries where Twilio Phone Numbers are available
    var result = pricingClient.ListVoiceCountries();
    foreach (VoiceCountry c in result.Countries)
    {
        Console.WriteLine(c.IsoCountry);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

foreach ($client->voiceCountries as $c) {
    echo $c->iso_country . "\n";
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@countries = @client.voice.countries.list
@countries.each do |c|
  puts c.iso_country
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var countries = CountryResource.Read();

        foreach (var country in countries)
        {
            Console.WriteLine(country.IsoCountry);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$voiceCountries = $client->pricing->voice->countries->read();

foreach ($voiceCountries as $c) {
    echo $c->isoCountry . PHP_EOL;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

countries = client.voice.countries.list()

for c in countries:
    print(c.iso_country)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

countries = @client.pricing.voice.countries.list
countries.each do |c|
  puts c.iso_country
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.list.pricing.VoiceCountryList;
import com.twilio.sdk.resource.instance.pricing.VoiceCountry;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get a list of countries where Twilio Voice is available
		VoiceCountryList list = client.getVoiceCountries();

		for (VoiceCountry c : list.getPageData()) {
			System.out.println(c.getIsoCountry());
		}
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

voice_countries = client.pricing \
                        .voice \
                        .countries \
                        .list()

for country in voice_countries:
    print(country.iso_country)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.pricing.v1.voice.Country;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get a list of countries where Twilio Voice is available
    ResourceSet<Country> countries = Country.reader().read();

    for (Country country : countries) {
      System.out.println(country.getIsoCountry());
    }
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Countries \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "meta": {
        "page": 0,
        "page_size": 50,
        "first_page_url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=0",
        "next_page_url": "https://pricing.twilio.com/v1/Voice/Countries?PageSize=50&Page=1&PageToken=DNDE",
        "key": "countries"
    },
    "countries": [
        {
            "country": "Andorra",
            "iso_country": "AD",
            "url": "https://pricing.twilio.com/v1/Voice/Countries/AD"
        },
        {
            "country": "United Arab Emirates",
            "iso_country": "AE",
            "url": "https://pricing.twilio.com/v1/Voice/Countries/AE"
        }
	...
     ]
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const PricingClient = require('twilio').PricingClient;
const client = new PricingClient(accountSid, authToken);

client.voice.numbers('+15108675310').get((err, number) => {
  console.log(number.outboundCallPrice.currentPrice);
});
// Get your Account SID and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

// Get twilio-node from twilio.com/docs/libraries/node
const client = require('twilio')(accountSid, authToken).pricing;

client.voice
  .numbers('+15108675310')
  .fetch()
  .then(number => {
    console.log(number.outboundCallPrice.current_price);
  })
  .catch(error => {
    console.log(error);
    throw error;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Pricing;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var pricingClient = new PricingClient(accountSid, authToken);

    // Look up pricing information for calls to/from a specific number
    var number = pricingClient.GetVoiceNumber("+15108675310");
    Console.WriteLine(number.OutboundCallPrice.CurrentPrice);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Pricing_Services_Twilio($sid, $token);

$number = $client->voiceNumbers->get("+15108675310");

echo $number->outbound_call_price->current_price . "\n";
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::PricingClient.new account_sid, auth_token

@number = @client.voice.numbers.get('+15108675310')
puts @number.outbound_call_price['current_price']
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Pricing.V1.Voice;
using Twilio.Types;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var number = NumberResource.Fetch(new PhoneNumber("+15108675310"));

        Console.WriteLine(number.OutboundCallPrice.CurrentPrice);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$number = $client->pricing->voice->numbers("+15108675310")->fetch();

$number->outboundCallPrice["current_price"] . PHP_EOL;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioPricingClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioPricingClient(account_sid, auth_token)

number = client.voice.numbers.get("+15108675310")

print(number.outbound_call_price['current_price'])
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

number = @client.pricing.voice.numbers('+15108675310')
puts number.fetch.outbound_call_price['current_price']
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioPricingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.pricing.VoiceNumber;

public class Example {

	// Find your Account Sid and Token at twilio.com/user/account
	public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
	public static final String AUTH_TOKEN = "your_auth_token";

	public static void main(String[] args) throws TwilioRestException {
		TwilioPricingClient client = new TwilioPricingClient(ACCOUNT_SID, AUTH_TOKEN);

		// Get Twilio Voice pricing for calls to/from a specific number
		VoiceNumber n = client.getVoiceNumber("+15108675310");

		System.out.println(n.getOutboundCallPrice().getCurrentPrice().toString());
	}
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

number = client.pricing \
               .voice \
               .numbers("+15108675310") \
               .fetch()

print(number.outbound_call_price['current_price'])
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.pricing.v1.voice.Number;
import com.twilio.type.PhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get Twilio Voice pricing for calls to/from a specific number
    Number voiceNumber = Number.fetcher(new PhoneNumber("+15108675310")).fetch();

    System.out.println(voiceNumber.getOutboundCallPrice().getCurrentPrice());
  }
}
curl -XGET https://pricing.twilio.com/v1/Voice/Numbers/+15108675310 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "number": "+15108675310",
    "country": "United States",
    "iso_country" : "US",
    "outbound_call_price": {
        "base_price": "0.015",
        "current_price": "0.015"
    },
    "inbound_call_price": {
        "number_type" : null,
        "base_price" : null,
        "current_price" : null
    },
    "price_unit": "USD",
    "url": "https://pricing.twilio.com/v1/Voice/Numbers/+15108673509"
}