Create rate plan

POST /v1/RatePlans

Capabilities and restrictions for SIMs

application/x-www-form-urlencoded

Body

  • UniqueName string

    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.

  • FriendlyName string

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

  • DataEnabled boolean

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

  • DataLimit integer

    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.

  • DataMetering string

    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.

  • MessagingEnabled boolean

    Whether SIMs can make, send, and receive SMS using Commands.

  • VoiceEnabled boolean

    Deprecated.

  • NationalRoamingEnabled boolean

    Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See national roaming.

  • InternationalRoaming array[string]

    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.

  • NationalRoamingDataLimit integer

    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 for more info.

  • InternationalRoamingDataLimit integer

    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.

  • DataLimitStrategy string

    The way the home network (T-Mobile USA) will behave after a SIM's usage exceeds its data_limit. Can be either block or throttle. Default is block.

    Values are block or throttle.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

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

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WP[0-9a-fA-F]{32}$.

    • unique_name string | null

      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.

    • account_sid string | null

      The SID of the Account that created the RatePlan resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • friendly_name string | null

      The string that you assigned to describe the resource.

    • data_enabled boolean | null

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

    • data_metering string | null

      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.

    • data_limit integer

      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.

      Default value is 0.

    • messaging_enabled boolean | null

      Whether SIMs can make, send, and receive SMS using Commands.

    • voice_enabled boolean | null

      Deprecated. Whether SIMs can make and receive voice calls.

    • national_roaming_enabled boolean | null

      Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See national roaming.

    • national_roaming_data_limit integer

      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.

      Default value is 0.

    • international_roaming array[string] | null

      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_limit integer

      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.

      Default value is 0.

    • date_created string(date-time) | null

      The date and time in GMT when the resource was created specified in ISO 8601 format.

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in ISO 8601 format.

    • url string(uri) | null

      The absolute URL of the resource.

POST /v1/RatePlans
curl \
 --request POST 'https://wireless.twilio.com/v1/RatePlans' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Status=status&DataLimit=1000&UniqueName=unique_name&DataEnabled=true&DataMetering=payg&FriendlyName=friendly_name&VoiceEnabled=true&MessagingEnabled=true&InternationalRoaming=data&InternationalRoaming=voice&InternationalRoaming=messaging&NationalRoamingEnabled=true&NationalRoamingDataLimit=1000&InternationalRoamingDataLimit=1000'
Request example
{"Status"=>"status", "DataLimit"=>1000, "UniqueName"=>"unique_name", "DataEnabled"=>true, "DataMetering"=>"payg", "FriendlyName"=>"friendly_name", "VoiceEnabled"=>true, "MessagingEnabled"=>true, "InternationalRoaming"=>["data", "voice", "messaging"], "NationalRoamingEnabled"=>true, "NationalRoamingDataLimit"=>1000, "InternationalRoamingDataLimit"=>1000}
Response examples (201)
{
  "sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "data_limit": 1000,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "unique_name": "unique_name",
  "data_enabled": true,
  "date_created": "2019-07-30T20:00:00Z",
  "date_updated": "2019-07-30T20:00:00Z",
  "data_metering": "payg",
  "friendly_name": "friendly_name",
  "voice_enabled": true,
  "messaging_enabled": true,
  "data_limit_strategy": "block",
  "international_roaming": [
    "data",
    "messaging",
    "voice"
  ],
  "usage_notification_url": "https://callback.com",
  "national_roaming_enabled": true,
  "usage_notification_method": "POST",
  "national_roaming_data_limit": 1000,
  "international_roaming_data_limit": 1000
}