Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

RatePlan Resource


(information)

Info

To avoid ambiguity throughout this page, Sim (initial cap) refers to the Sim API resource. SIM (all caps) refers to the physical Subscriber Identity Module (that is, a SIM card) associated with a Sim resource.

A Rate Plan determines the capabilities and restrictions of each and every Sim instance associated with it.


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

Any number of Sim's can be assigned to the same Rate Plan. Each of those Sim's inherits the same capabilities and restrictions, such as whether or not each SIM can use data or SMS via Commands, how much data each SIM can use each month, and how usage will be billed. To change a SIM's capabilities and restrictions, it's Sim must be assigned to a different Rate Plan.

A Rate Plan instance can be referenced in the API either by its unique Sid or user-defined UniqueName.


_10
https://wireless.twilio.com/v1/RatePlans/{Sid}
_10
https://wireless.twilio.com/v1/RatePlans/{UniqueName}


RatePlan Properties

rateplan-properties page anchor
Resource properties
sidtype: SID<WP>Not PII

The unique string that we created to identify the RatePlan resource.


unique_nametype: stringNot PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the resource.


data_enabledtype: booleanNot PII

Whether SIMs can use GPRS/3G/4G/LTE data connectivity.


data_meteringtype: stringNot PII

The model used to meter data usage. Can be: payg and quota-1, quota-10, and quota-50. Learn more about the available data metering models(link takes you to an external page).


data_limittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.


messaging_enabledtype: booleanNot PII

Whether SIMs can make, send, and receive SMS using Commands(link takes you to an external page).


voice_enabledtype: booleanNot PII

Deprecated. Whether SIMs can make and receive voice calls.


national_roaming_enabledtype: booleanNot PII

Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See national roaming(link takes you to an external page).


national_roaming_data_limittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.


international_roamingtype: string[]Not PII

The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: data and messaging.


international_roaming_data_limittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the resource.


PAYG vs Quota Data Plans

payg-vs-quota-data-plans page anchor

Quota Data Plans offer you a self-serve way to receive discounted data pricing in exchange for committing to a minimum dollar spend for each active SIM using the Rate Plan.

For low usage devices, the "Pay as you go" (PAYG) Data Plan is available. 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 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(link takes you to an external page) for more information.


Each SIM's usage is measured independently. Data Limits specified by the Rate Plan are on a per SIM basis. 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.


National roaming grants a SIM the ability to roam onto other carrier networks in the United States in certain low coverage situations. This will allow a SIM to roam onto regional US networks like GCI(link takes you to an external page) in Alaska. The SIM will prioritize T-Mobile USA, the 'home' network, when coverage is available.

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.


(warning)

Warning

Usage Notifications are currently in Private Beta . If you would like access to this feature please contact your IoT Account Executive or contact customer support.

You can receive Usage Notifications for every Sim instance assigned to a Rate Plan, allowing you to programmatically respond before the Sim reaches its Data Limit.

An HTTP request will be made to the configurable usage_notification_url using the usage_notification_method.

Usage Notifications will be fired when your Sim's Data Usage is ~75%, ~90%, 100%. If your Sim used 100% of its Data Limit during the current usage period, an additional Usage Notification will be fired when your Sim's Data Limit resets and your SIM can resume using data. No Usage Notification will be fired when your usage period resets if your Sim did not use 100% of the Data Limit during the current usage period.

Usage Notifications have the following properties:

SimSidThe SID of the Sim.
SimUniqueNameUser provided string that uniquely identifies the Sim. Alternative to SimSid.
AccountSidThe unique ID of the Account that the Sim belongs to.
DataLimitTypeThe type of Data Limit to which the notification pertains. Either data_limit, international_roaming_data_limit, or national_roaming_data_limit.
DataLimitAmount of data usage allowed in the usage period. Once DataConsumed is greater than or equal to this value, the SIM will be blocked from using any additional data.
DataConsumedAmount of data usage from the current usage period that has been applied towards the DataLimit.
NextUsagePeriodThe date when the next usage period starts at which point the DataConsumed resets to 0.

Create a RatePlan resource

create-a-rateplan-resource page anchor
POST https://wireless.twilio.com/v1/RatePlans

Parameters

create-parameters page anchor
Request body parameters
UniqueNametype: stringNot PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.


FriendlyNametype: stringNot PII

A descriptive string that you create to describe the resource. It does not have to be unique.


DataEnabledtype: booleanNot PII

Whether SIMs can use GPRS/3G/4G/LTE data connectivity.


DataLimittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is 1000.


DataMeteringtype: stringNot PII

The model used to meter data usage. Can be: payg and quota-1, quota-10, and quota-50. Learn more about the available data metering models(link takes you to an external page).


MessagingEnabledtype: booleanNot PII

Whether SIMs can make, send, and receive SMS using Commands(link takes you to an external page).


VoiceEnabledtype: booleanNot PII

Deprecated.


NationalRoamingEnabledtype: booleanNot PII

Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See national roaming(link takes you to an external page).


InternationalRoamingtype: string[]Not PII

The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: data and messaging.


NationalRoamingDataLimittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See national roaming(link takes you to an external page) for more info.


InternationalRoamingDataLimittype: integerNot PII

The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.wireless.v1.ratePlans
_10
.create()
_10
.then(rate_plan => console.log(rate_plan.sid));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"unique_name": "unique_name",
_22
"data_enabled": true,
_22
"data_limit": 1000,
_22
"data_metering": "payg",
_22
"date_created": "2019-07-30T20:00:00Z",
_22
"date_updated": "2019-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"messaging_enabled": true,
_22
"voice_enabled": true,
_22
"national_roaming_enabled": true,
_22
"national_roaming_data_limit": 1000,
_22
"international_roaming": [
_22
"data",
_22
"messaging",
_22
"voice"
_22
],
_22
"international_roaming_data_limit": 1000,
_22
"sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}


Fetch a RatePlan resource

fetch-a-rateplan-resource page anchor
GET https://wireless.twilio.com/v1/RatePlans/{Sid}

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the RatePlan resource to fetch.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.wireless.v1.ratePlans('WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(rate_plan => console.log(rate_plan.uniqueName));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"unique_name": "unique_name",
_22
"data_enabled": true,
_22
"data_limit": 1000,
_22
"data_metering": "payg",
_22
"date_created": "2019-07-30T20:00:00Z",
_22
"date_updated": "2019-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"messaging_enabled": true,
_22
"voice_enabled": true,
_22
"national_roaming_enabled": true,
_22
"national_roaming_data_limit": 1000,
_22
"international_roaming": [
_22
"data",
_22
"messaging",
_22
"voice"
_22
],
_22
"international_roaming_data_limit": 1000,
_22
"sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}


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

URI parameters
PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.wireless.v1.ratePlans
_10
.list({limit: 20})
_10
.then(ratePlans => ratePlans.forEach(r => console.log(r.sid)));

Output

_12
{
_12
"meta": {
_12
"first_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
_12
"key": "rate_plans",
_12
"next_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=1",
_12
"page": 0,
_12
"page_size": 50,
_12
"previous_page_url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0",
_12
"url": "https://wireless.twilio.com/v1/RatePlans?PageSize=50&Page=0"
_12
},
_12
"rate_plans": []
_12
}


Update a RatePlan resource

update-a-rateplan-resource page anchor
POST https://wireless.twilio.com/v1/RatePlans/{Sid}

(warning)

Warning

The only fields that can be updated on a Rate Plan after it has been created is its Unique Name and Friendly Name. If you need to alter your SIM's capabilities you must create a new Rate Plan and reassign the Sim to the new Rate Plan.

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the RatePlan resource to update.


Request body parameters
UniqueNametype: stringNot PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.


FriendlyNametype: stringNot PII

A descriptive string that you create to describe the resource. It does not have to be unique.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.wireless.v1.ratePlans('WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.update({uniqueName: 'unique_name'})
_10
.then(rate_plan => console.log(rate_plan.uniqueName));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"unique_name": "unique_name",
_22
"data_enabled": true,
_22
"data_limit": 1000,
_22
"data_metering": "payg",
_22
"date_created": "2019-07-30T20:00:00Z",
_22
"date_updated": "2019-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"messaging_enabled": true,
_22
"voice_enabled": true,
_22
"national_roaming_enabled": true,
_22
"national_roaming_data_limit": 1000,
_22
"international_roaming": [
_22
"data",
_22
"messaging",
_22
"voice"
_22
],
_22
"international_roaming_data_limit": 1000,
_22
"sid": "WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"url": "https://wireless.twilio.com/v1/RatePlans/WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}


Delete a RatePlan resource

delete-a-rateplan-resource page anchor
DELETE https://wireless.twilio.com/v1/RatePlans/{Sid}

(warning)

Warning

You cannot delete a Rate Plan if there are any Sims assigned to it that have active or ready statuses.

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the RatePlan resource to delete.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.wireless.v1.ratePlans('WPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: