REST API: Rate Plans - Twilio
Register for SIGNAL by 8/31 for $250 off. Register now.

REST API: Rate Plans

A Rate Plan describes the capabilities and restrictions of each and every SIM associated with it.

Multiple SIMs can be configured to use the same Rate Plan, meaning that those SIMs inherit the same capabilities and restrictions. However, each SIM's usage is measured independently against the Rate Plan and any limits specified by the Rate Plan are measured and enforced at the individual SIM level. For example, if a Rate Plan specifies a Data Limit of 5MB, every SIM on that Rate Plan will be allowed to consume 5MB of data.

Currently, your ability to edit a Rate Plan once it's created are limited. To change a SIM's capabilities after it's been activated, you'll need to associate it with a different Rate Plan.

Common Tasks

HTTP Resources and Methods

Rate Plan Instance Resource

Resource URLs

https://wireless.twilio.com/v1/RatePlans/{RatePlanSid}
https://wireless.twilio.com/v1/RatePlans/{RatePlanUniqueName}

Resource Properties

A Rate Plan instance resource is represented by the following properties:

Property Type Description
sid String A 34 character string that uniquely identifies this resource.
unique_name String A user-provided string that uniquely identifies this resource as an alternative to the sid.
friendly_name String A user-provided string that identifies this resource. Non-unique.
data_enabled Boolean Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity.
data_limit Integer Network-enforced limit specifying the total Megabytes of data usage (download and upload combined) allowed during one month on the home network. Metering begins on the day of activation and ends on the same day of the following month. Max value is 2TB.
data_metering Enum The model by which to meter data usage, in accordance with the two available data metering models. Valid options are payg, quota-1, quota-10, quota-50.
national_roaming_enabled Boolean Defines whether SIMs can roam onto other networks in the SIM's home country. See 'national' roaming.
national_roaming_data_limit Integer Network-enforced limit specifying the total Megabytes of national roaming data usage (download and upload combined) allowed during one month. Max value is 2TB.
international_roaming_data_limit Integer Network-enforced limit specifying the total Megabytes of national roaming data usage (download and upload combined) allowed during one month. Max value is 2TB.
international_roaming Enum Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity and messaging outside of the United States. Acceptable values are data and messaging.
voice_enabled Boolean Defines whether SIMs are capable of making and receiving voice calls.
messaging_enabled Boolean Defines whether SIMs are capable of making and sending and receiving SMS via Commands.
date_created DateTime The date that this resource was created, given as GMT in ISO 8601 format.
date_updated DateTime The date that this resource was last updated, given as GMT in ISO 8601 format.
account_sid String The unique id of the Account that this Rate Plan belongs to.
url String The URL for this resource.
Explanation of PAYG vs Quota

For low usage devices, the "Pay as you go" (PAYG) Data Metering plan is provided. With PAYG data, you'll only pay for the data you consume, with no minimum data spend per SIM per month.

For higher usage devices, it is probably more cost effective to use a Quota-based Data Metering plan. With a Quota-based plan, you agree to a minimum data spend, or "Quota" level per SIM per month. In return, you will receive discount rates in every country, with more significant discounts for higher Quotas.

Even on a Quota plan, data is still priced per megabyte and metered at byte-level. But at the end of your SIM's billing month, you either pay for exactly what you consumed, or the Quota price, whichever is higher.

See Pricing for more information.

HTTP GET

Returns a representation of the Rate Plan identified by the Sid or UniqueName property.

Example

Request a Rate Plan instance using its Sid, represented as JSON.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
               .fetch()
               .then(rate_plan => console.log(rate_plan.uniqueName))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Fetch(
            pathSid: "WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        );

        Console.WriteLine(ratePlan.UniqueName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
                                  ->fetch();

print($rate_plan->uniqueName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless
                   .rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
                   .fetch

puts rate_plan.unique_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless \
                  .rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') \
                  .fetch()

print(rate_plan.unique_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = 
            RatePlan.fetcher("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
            .fetch();

        System.out.println(ratePlan.getUniqueName());
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans/WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "unique_name",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "friendly_name",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Get a Rate Plan
Example

Request a Rate Plan instance using its Unique Name, represented as JSON.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('us-automotive')
               .fetch()
               .then(rate_plan => console.log(rate_plan.uniqueName))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Fetch(pathSid: "us-automotive");

        Console.WriteLine(ratePlan.UniqueName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans("us-automotive")
                                  ->fetch();

print($rate_plan->uniqueName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless.rate_plans('us-automotive').fetch

puts rate_plan.unique_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless.rate_plans('us-automotive').fetch()

print(rate_plan.unique_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = RatePlan.fetcher("us-automotive").fetch();

        System.out.println(ratePlan.getUniqueName());
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans/us-automotive' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "unique_name",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "friendly_name",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Get a Rate Plan by Unique Name

HTTP POST

The POST method allows you to update a Rate Plan instance resource.

Optional Parameters

Any or all of the following parameters can be provided. In the case where a request parameter corresponds to a property on the instance resource, that property will be updated to the provided value.

Parameter Description
UniqueName A user-provided string that uniquely identifies this resource as an alternative to the Sid.
FriendlyName A user-provided string that identifies this resource. Non-unique.

HTTP PUT

Not supported.

HTTP DELETE

The DELETE method allows you to delete a Rate Plan instance resource.

Note that Rate Plans can only be deleted when they have no active SIMs associated with them.

If the Rate Plan is successfully deleted, the API will return an HTTP 204 NO CONTENT response.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
               .remove()
               .then(rate_plan => console.log(rate_plan.sid))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        RatePlanResource.Delete(pathSid: "WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->wireless->v1->ratePlans("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
                     ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

@client.wireless.rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA').delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

client.wireless.rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA').delete()
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan.deleter("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").delete();
    }
}
curl -X DELETE https://wireless.twilio.com/v1/RatePlans/WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
Delete a Rate Plan

Rate Plans List Resource

Resource URL

https://wireless.twilio.com/v1/RatePlans

HTTP GET

Returns a list of Rate Plans within an account. The list includes paging information.

Example 1

List all Rate Plans in the account.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans.each(ratePlans => console.log(ratePlans.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlans = RatePlanResource.Read();

        foreach(var record in ratePlans)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$ratePlans = $twilio->wireless->v1->ratePlans
                                  ->read();

foreach ($ratePlans as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plans = @client.wireless.rate_plans.list

rate_plans.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plans = client.wireless.rate_plans.list()

for record in rate_plans:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        ResourceSet<RatePlan> ratePlans = RatePlan.reader().read();

        for(RatePlan record : ratePlans) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "meta": {
    "first_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
    "key": "rate_plans",
    "next_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=1",
    "page": 0,
    "page_size": 50,
    "previous_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
    "url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0"
  },
  "rate_plans": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "unique_name": "unique_name",
      "data_enabled": true,
      "data_limit": 1000,
      "data_metering": "pooled",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:00:00Z",
      "friendly_name": "friendly_name",
      "messaging_enabled": true,
      "voice_enabled": true,
      "national_roaming_enabled": true,
      "national_roaming_data_limit": 1000,
      "international_roaming": [
        "data",
        "messaging",
        "voice"
      ],
      "international_roaming_data_limit": 1000,
      "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
  ]
}
List all Rate Plans

HTTP POST

You can create a new Rate Plan resource by POSTing to the Rate Plans list resource.

Required Parameters

No required parameters.

Optional Parameters

Any or all of the following parameters can be provided. In the case where a request parameter corresponds to a property on the instance resource, that property will be set to the provided value. Default values for newly created instance resources are included in the table.

Parameter Description Default Property Value
UniqueName A user-provided string that uniquely identifies this resource as an alternative to the Sid. null
FriendlyName A user-provided string that identifies this resource. Non-unique. null
DataEnabled Boolean Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity.
DataLimit Integer Network-enforced limit specifying the total Megabytes of data usage (download and upload combined) allowed during one month on the home network. Metering begins on the day of activation and ends on the same day of the following month. Max value is 2TB.
DataMetering Enum The model by which to meter data usage, in accordance with the two available data metering models. Valid options are payg, quota-1, quota-10, quota-50.
VoiceEnabled Boolean Defines whether SIMs are capable of making and receiving voice calls.
MessagingEnabled Boolean Defines whether SIMs are capable of making and sending and receiving SMS messages via either Commands or Programmable SMS APIs.
NationalRoamingEnabled Boolean Defines whether SIMs can roam onto other networks in the SIM's home country. See 'national' roaming.
NationalRoamingDataLimit Integer Network-enforced limit specifying the total Megabytes of national roaming data usage (download and upload combined) allowed during one month. Max value is 2TB. If unspecified, the default value is the lesser of DataLimit and 1000MB.
InternationalRoamingDataLimit Integer Network-enforced limit specifying the total Megabytes of national roaming data usage (download and upload combined) allowed during one month. Max value is 2TB. If unspecified, the default value is the lesser of DataLimit and 1000MB.
InternationalRoaming Enum Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity and messaging outside of the United States. Acceptable values are data and messaging.
Example

Create a new Rate Plan with an UniqueName of 'SmartMeterCA' and a Friendly Name of "California SmartMeter Plan" with a data usage limit of 5MB per month and messaging enabled for Commands.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans
               .create({
                  friendlyName: 'California SmartMeter Plan',
                  messagingEnabled: true,
                  uniqueName: 'SmartMeterCA'
                })
               .then(rate_plan => console.log(rate_plan.sid))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Create(
            friendlyName: "California SmartMeter Plan",
            messagingEnabled: true,
            uniqueName: "SmartMeterCA"
        );

        Console.WriteLine(ratePlan.Sid);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans
                                  ->create(array(
                                               "friendlyName" => "California SmartMeter Plan",
                                               "messagingEnabled" => True,
                                               "uniqueName" => "SmartMeterCA"
                                           )
                                  );

print($rate_plan->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless
                   .rate_plans
                   .create(
                      friendly_name: 'California SmartMeter Plan',
                      messaging_enabled: true,
                      unique_name: 'SmartMeterCA'
                    )

puts rate_plan.sid
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless \
                  .rate_plans \
                  .create(
                       friendly_name='California SmartMeter Plan',
                       messaging_enabled=True,
                       unique_name='SmartMeterCA'
                   )

print(rate_plan.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = RatePlan.creator()
            .setFriendlyName("California SmartMeter Plan")
            .setMessagingEnabled(true)
            .setUniqueName("SmartMeterCA")
            .create();

        System.out.println(ratePlan.getSid());
    }
}
curl -X POST https://wireless.twilio.com/v1/RatePlans \
--data-urlencode "FriendlyName=California SmartMeter Plan" \
--data-urlencode "MessagingEnabled=True" \
--data-urlencode "UniqueName=SmartMeterCA" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "SmartMeterCA",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "California SmartMeter Plan",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Create a Rate Plan

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

National Roaming

National roaming grants a SIM the ability to roam onto other domestic carrier networks in certain low coverage situations. This will allow a SIM to roam onto regional US networks like GCI in Alaska.

National roaming pricing is different to standard data and Commands pricing. Before enabling national roaming on your Rate Plan, it is recommended to review the pricing.

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:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
               .fetch()
               .then(rate_plan => console.log(rate_plan.uniqueName))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Fetch(
            pathSid: "WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        );

        Console.WriteLine(ratePlan.UniqueName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
                                  ->fetch();

print($rate_plan->uniqueName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless
                   .rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
                   .fetch

puts rate_plan.unique_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless \
                  .rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') \
                  .fetch()

print(rate_plan.unique_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = 
            RatePlan.fetcher("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
            .fetch();

        System.out.println(ratePlan.getUniqueName());
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans/WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "unique_name",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "friendly_name",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('us-automotive')
               .fetch()
               .then(rate_plan => console.log(rate_plan.uniqueName))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Fetch(pathSid: "us-automotive");

        Console.WriteLine(ratePlan.UniqueName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans("us-automotive")
                                  ->fetch();

print($rate_plan->uniqueName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless.rate_plans('us-automotive').fetch

puts rate_plan.unique_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless.rate_plans('us-automotive').fetch()

print(rate_plan.unique_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = RatePlan.fetcher("us-automotive").fetch();

        System.out.println(ratePlan.getUniqueName());
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans/us-automotive' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "unique_name",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "friendly_name",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
               .remove()
               .then(rate_plan => console.log(rate_plan.sid))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        RatePlanResource.Delete(pathSid: "WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->wireless->v1->ratePlans("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
                     ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

@client.wireless.rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA').delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

client.wireless.rate_plans('WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA').delete()
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan.deleter("WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").delete();
    }
}
curl -X DELETE https://wireless.twilio.com/v1/RatePlans/WPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans.each(ratePlans => console.log(ratePlans.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlans = RatePlanResource.Read();

        foreach(var record in ratePlans)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$ratePlans = $twilio->wireless->v1->ratePlans
                                  ->read();

foreach ($ratePlans as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plans = @client.wireless.rate_plans.list

rate_plans.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plans = client.wireless.rate_plans.list()

for record in rate_plans:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        ResourceSet<RatePlan> ratePlans = RatePlan.reader().read();

        for(RatePlan record : ratePlans) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://wireless.twilio.com/v1/RatePlans' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "meta": {
    "first_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
    "key": "rate_plans",
    "next_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=1",
    "page": 0,
    "page_size": 50,
    "previous_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
    "url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0"
  },
  "rate_plans": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "unique_name": "unique_name",
      "data_enabled": true,
      "data_limit": 1000,
      "data_metering": "pooled",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:00:00Z",
      "friendly_name": "friendly_name",
      "messaging_enabled": true,
      "voice_enabled": true,
      "national_roaming_enabled": true,
      "national_roaming_data_limit": 1000,
      "international_roaming": [
        "data",
        "messaging",
        "voice"
      ],
      "international_roaming_data_limit": 1000,
      "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
  ]
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.wireless.ratePlans
               .create({
                  friendlyName: 'California SmartMeter Plan',
                  messagingEnabled: true,
                  uniqueName: 'SmartMeterCA'
                })
               .then(rate_plan => console.log(rate_plan.sid))
               .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Wireless.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var ratePlan = RatePlanResource.Create(
            friendlyName: "California SmartMeter Plan",
            messagingEnabled: true,
            uniqueName: "SmartMeterCA"
        );

        Console.WriteLine(ratePlan.Sid);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$rate_plan = $twilio->wireless->v1->ratePlans
                                  ->create(array(
                                               "friendlyName" => "California SmartMeter Plan",
                                               "messagingEnabled" => True,
                                               "uniqueName" => "SmartMeterCA"
                                           )
                                  );

print($rate_plan->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

rate_plan = @client.wireless
                   .rate_plans
                   .create(
                      friendly_name: 'California SmartMeter Plan',
                      messaging_enabled: true,
                      unique_name: 'SmartMeterCA'
                    )

puts rate_plan.sid
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


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

rate_plan = client.wireless \
                  .rate_plans \
                  .create(
                       friendly_name='California SmartMeter Plan',
                       messaging_enabled=True,
                       unique_name='SmartMeterCA'
                   )

print(rate_plan.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.wireless.v1.RatePlan;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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);
        RatePlan ratePlan = RatePlan.creator()
            .setFriendlyName("California SmartMeter Plan")
            .setMessagingEnabled(true)
            .setUniqueName("SmartMeterCA")
            .create();

        System.out.println(ratePlan.getSid());
    }
}
curl -X POST https://wireless.twilio.com/v1/RatePlans \
--data-urlencode "FriendlyName=California SmartMeter Plan" \
--data-urlencode "MessagingEnabled=True" \
--data-urlencode "UniqueName=SmartMeterCA" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "unique_name": "SmartMeterCA",
  "data_enabled": true,
  "data_limit": 1000,
  "data_metering": "pooled",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "friendly_name": "California SmartMeter Plan",
  "messaging_enabled": true,
  "voice_enabled": true,
  "national_roaming_enabled": true,
  "national_roaming_data_limit": 1000,
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "international_roaming_data_limit": 1000,
  "sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}