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

Fleet 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 Fleet resource organizes and configures group of Sim resources:


_10
https://supersim.twilio.com/v1/Fleets

A Sim resource must be assigned to a Fleet resource by specifying fleet on the Sim resource before it can activated.

Some of a Fleet resource's properties are immutable. If you wish to change a Super SIM's behavior, you may need to create a new Fleet resource and reassign the Sim resource to the new Fleet resource.


Fleet Properties

fleet-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The SID of the Account that created the Fleet resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

sidSID<HF>

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

Pattern: ^HF[0-9a-fA-F]{32}$Min length: 34Max length: 34

unique_namestring

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.


date_updatedstring<date-time>

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


urlstring<uri>

The absolute URL of the Fleet resource.


data_enabledboolean

Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to true.


data_limitinteger

The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 250MB.


data_meteringenum<string>

The model by which a SIMs usage is metered and billed. Defaults to payg.

Possible values:
payg

sms_commands_enabledboolean

Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to false.


sms_commands_urlstring<uri>

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


sms_commands_methodenum<http-method>

A string representing the HTTP method to use when making a request to sms_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

network_access_profile_sidSID<HA>

The SID of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to.

Pattern: ^HA[0-9a-fA-F]{32}$Min length: 34Max length: 34

ip_commands_urlstring<uri>

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device to a special IP address. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


ip_commands_methodenum<http-method>

A string representing the HTTP method to use when making a request to ip_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

Each Super SIM's usage is measured independently. Data limits are specified in the Fleet resource on a per SIM basis. For example, if a Fleet resource specifies a data limit of 5MB, every SIM assigned to that Fleet resource will be allowed to consume no more than 5MB of data.

If you update your Fleet's data limit, it will take a few moments, typically five minutes or less, for the Super SIMs assigned to that Fleet to respect the new data limit while the cached value expires. If you increase the data limit and have SIMs that are blocked because their data usage exceeded the previous data limit, they will automatically be unblocked when the new data limit takes effect. Similarly, SIMs whose data usage for the current billing period exceeds the new data limit will be blocked, if they were not already, when the new data limit takes effect. It should not take longer than 15minutes for the new data limit to take effect for all of the Super SIMs on your Fleet.

You can use the BillingPeriods subresource and UsageRecords resource to calculate how much of a SIM's data limit has been used. See more details here.


POST https://supersim.twilio.com/v1/Fleets

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
NetworkAccessProfilestringrequired

The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to.


UniqueNamestringOptional

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.


DataEnabledbooleanOptional

Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to true.


DataLimitintegerOptional

The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000).


IpCommandsUrlstring<uri>Optional

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device to a special IP address. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


IpCommandsMethodenum<http-method>Optional

A string representing the HTTP method to use when making a request to ip_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

SmsCommandsEnabledbooleanOptional

Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to true.


SmsCommandsUrlstring<uri>Optional

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


SmsCommandsMethodenum<http-method>Optional

A string representing the HTTP method to use when making a request to sms_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

Create Fleet

create-fleet page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function createFleet() {
_18
const fleet = await client.supersim.v1.fleets.create({
_18
networkAccessProfile: "NetworkAccessProfile",
_18
});
_18
_18
console.log(fleet.accountSid);
_18
}
_18
_18
createFleet();

Output

_17
{
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"unique_name": "unique_name",
_17
"data_enabled": true,
_17
"data_limit": 500,
_17
"data_metering": "payg",
_17
"date_created": "2019-07-30T20:00:00Z",
_17
"date_updated": "2019-07-30T20:00:00Z",
_17
"sms_commands_enabled": true,
_17
"sms_commands_method": "GET",
_17
"sms_commands_url": "https://google.com",
_17
"ip_commands_method": "GET",
_17
"ip_commands_url": "https://google.com",
_17
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_17
}


GET https://supersim.twilio.com/v1/Fleets/{Sid}

Property nameTypeRequiredPIIDescription
Sidstringrequired

The SID of the Fleet resource to fetch.

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

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function fetchFleet() {
_16
const fleet = await client.supersim.v1.fleets("Sid").fetch();
_16
_16
console.log(fleet.accountSid);
_16
}
_16
_16
fetchFleet();

Output

_17
{
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"unique_name": "unique_name",
_17
"data_enabled": true,
_17
"data_limit": 1000,
_17
"data_metering": "payg",
_17
"date_created": "2019-07-30T20:00:00Z",
_17
"date_updated": "2019-07-30T20:00:00Z",
_17
"sms_commands_enabled": true,
_17
"sms_commands_method": "POST",
_17
"sms_commands_url": null,
_17
"ip_commands_method": "POST",
_17
"ip_commands_url": null,
_17
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"sid": "Sid",
_17
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_17
}


Read multiple Fleet resources

read-multiple-fleet-resources page anchor
GET https://supersim.twilio.com/v1/Fleets

Property nameTypeRequiredPIIDescription
NetworkAccessProfilestringOptional

The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to.


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

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

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function listFleet() {
_16
const fleets = await client.supersim.v1.fleets.list({ limit: 20 });
_16
_16
fleets.forEach((f) => console.log(f.accountSid));
_16
}
_16
_16
listFleet();

Output

_30
{
_30
"meta": {
_30
"first_page_url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_30
"key": "fleets",
_30
"next_page_url": null,
_30
"page": 0,
_30
"page_size": 50,
_30
"previous_page_url": null,
_30
"url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
_30
},
_30
"fleets": [
_30
{
_30
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_30
"unique_name": "Pilot Fleet",
_30
"data_enabled": true,
_30
"data_limit": 1000,
_30
"data_metering": "payg",
_30
"date_created": "2019-10-15T20:00:00Z",
_30
"date_updated": "2019-10-15T20:00:00Z",
_30
"sms_commands_enabled": true,
_30
"sms_commands_method": "POST",
_30
"sms_commands_url": null,
_30
"ip_commands_method": "POST",
_30
"ip_commands_url": null,
_30
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_30
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_30
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_30
}
_30
]
_30
}


POST https://supersim.twilio.com/v1/Fleets/{Sid}

Property nameTypeRequiredPIIDescription
Sidstringrequired

The SID of the Fleet resource to update.

Property nameTypeRequiredPIIDescription
UniqueNamestringOptional

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.


NetworkAccessProfilestringOptional

The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to.


IpCommandsUrlstring<uri>Optional

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device to a special IP address. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


IpCommandsMethodenum<http-method>Optional

A string representing the HTTP method to use when making a request to ip_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

SmsCommandsUrlstring<uri>Optional

The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.


SmsCommandsMethodenum<http-method>Optional

A string representing the HTTP method to use when making a request to sms_commands_url. Can be one of POST or GET. Defaults to POST.

Possible values:
GETPOST

DataLimitintegerOptional

The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000).

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

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function updateFleet() {
_19
const fleet = await client.supersim.v1.fleets("Sid").update({
_19
dataLimit: 5000,
_19
uniqueName: "GPS Trackers Fleet 5GB",
_19
});
_19
_19
console.log(fleet.uniqueName);
_19
}
_19
_19
updateFleet();

Output

_17
{
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"unique_name": "GPS Trackers Fleet 5GB",
_17
"data_enabled": true,
_17
"data_limit": 5000,
_17
"data_metering": "payg",
_17
"date_created": "2019-10-15T20:00:00Z",
_17
"date_updated": "2019-10-15T20:00:00Z",
_17
"sms_commands_enabled": true,
_17
"sms_commands_method": "POST",
_17
"sms_commands_url": null,
_17
"ip_commands_method": "POST",
_17
"ip_commands_url": null,
_17
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"sid": "Sid",
_17
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_17
}


Customers can now delete unused and unwanted Fleets and their associated data. This can be done in Console(link takes you to an external page): visit Internet of Things > Fleets(link takes you to an external page), click on the name of the Fleet you wish to delete, and click the Delete Fleet link at the bottom of the page. You will be asked to confirm your action before the Fleet is deleted. Fleets to which SIMs are currently assigned cannot be deleted.

delete fleet form in console.

Rate this page: