NAME

Twilio::Rest::Wireless::V1::Sim - The Sim resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $sim ($client->wireless->v1->sims->read({}, 20)) {
  ...
}
my $sim = $client->wireless->v1->sims($sid)->fetch;
$client->wireless->v1->sims($sid)->update(\%options);
$client->wireless->v1->sims($sid)->delete;

DESCRIPTION

A resource representing a Programmable Wireless SIM

This file holds SimList, SimPage, SimContext and SimInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SimList

Returned by $client->wireless->v1->sims. See also Twilio::ListResource.

read

my @records = $client->wireless->v1->sims->read(\%options, $limit, $page_size);

Retrieve a list of Sim resources on your Account. Returns the records as a list, fetching as many pages as it needs.

The options are:

e_id

Deprecated.

iccid

Only return Sim resources with this ICCID. This will return a list with a maximum size of 1.

rate_plan

The SID or unique name of a RatePlan resource. Only return Sim resources assigned to this RatePlan resource.

sim_registration_code

Only return Sim resources with this registration code. This will return a list with a maximum size of 1.

status

Only return Sim resources with this status. One of new, ready, active, suspended, deactivated, canceled, scheduled or updating.

stream

my $stream = $client->wireless->v1->sims->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->wireless->v1->sims->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->wireless->v1->sims->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->wireless->v1->sims->get_context($sid);

Returns a SimContext, and makes no request.

SimPage

A Twilio::Page of SimInstance objects.

records_key

build_instance

Used by Twilio::Page.

SimContext

Returned by $client->wireless->v1->sims($sid). It makes no request until one of these methods is called.

fetch

my $sim = $client->wireless->v1->sims($sid)->fetch;

Fetch a Sim resource on your Account. Returns a SimInstance.

update

my $sim = $client->wireless->v1->sims($sid)->update(\%options);

Updates the given properties of a Sim resource on your Account. Returns a SimInstance.

The options are:

account_sid

The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. For more information, see the Move SIMs between Subaccounts documentation.

callback_method

The HTTP method we should use to call callback_url. Can be: POST or GET. The default is POST. One of GET or POST.

callback_url

The URL we should call using the callback_url when the SIM has finished updating. When the SIM transitions from new to ready or from any status to deactivated, we call this URL when the status changes to an intermediate status (ready or deactivated) and again when the status changes to its final status (active or canceled).

commands_callback_method

The HTTP method we should use to call commands_callback_url. Can be: POST or GET. The default is POST. One of GET or POST.

commands_callback_url

The URL we should call using the commands_callback_method when the SIM sends a Command. Your server should respond with an HTTP status code in the 200 range; any response body is ignored.

friendly_name

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

rate_plan

The SID or unique name of the RatePlan resource to which the Sim resource should be assigned.

reset_status

Must be resetting.

sms_fallback_method

The HTTP method we should use to call sms_fallback_url. Can be: GET or POST. Default is POST. One of GET or POST.

sms_fallback_url

The URL we should call using the sms_fallback_method when an error occurs while retrieving or executing the TwiML requested from sms_url.

sms_method

The HTTP method we should use to call sms_url. Can be: GET or POST. Default is POST. One of GET or POST.

sms_url

The URL we should call using the sms_method when the SIM-connected device sends an SMS message that is not a Command.

status

One of new, ready, active, suspended, deactivated, canceled, scheduled or updating.

unique_name

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

voice_fallback_method

Deprecated. One of GET or POST.

voice_fallback_url

Deprecated.

voice_method

Deprecated. One of GET or POST.

voice_url

Deprecated.

delete

$client->wireless->v1->sims($sid)->delete;

Delete a Sim resource on your Account. Returns true.

data_sessions

my $list = $object->data_sessions;

See Twilio::Rest::Wireless::V1::Sim::DataSession.

usage_records

my $list = $object->usage_records;

See Twilio::Rest::Wireless::V1::Sim::UsageRecord.

SimInstance

See also Twilio::InstanceResource.

It has fetch, update, delete, data_sessions and usage_records, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account to which the Sim resource belongs.

commands_callback_method

The HTTP method we use to call commands_callback_url. Can be: POST or GET. Default is POST. One of GET or POST.

commands_callback_url

The URL we call using the commands_callback_method when the SIM originates a machine-to-machine Command. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored.

date_created

The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT when the Sim resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

e_id

Deprecated.

friendly_name

The string that you assigned to describe the Sim resource.

iccid

The ICCID associated with the SIM.

ip_address

Deprecated.

The URLs of related subresources.

rate_plan_sid

The SID of the RatePlan resource to which the Sim resource is assigned.

reset_status

Must be resetting.

sid

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

sms_fallback_method

Deprecated. One of GET or POST.

sms_fallback_url

Deprecated.

sms_method

Deprecated. One of GET or POST.

sms_url

Deprecated.

status

One of new, ready, active, suspended, deactivated, canceled, scheduled or updating.

unique_name

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.

url

The absolute URL of the resource.

voice_fallback_method

Deprecated. The HTTP method we use to call voice_fallback_url. Can be: GET or POST. Default is POST. One of GET or POST.

voice_fallback_url

Deprecated. The URL we call using the voice_fallback_method when an error occurs while retrieving or executing the TwiML requested from voice_url.

voice_method

Deprecated. The HTTP method we use to call voice_url. Can be: GET or POST. Default is POST. One of GET or POST.

voice_url

Deprecated. The URL we call using the voice_method when the SIM-connected device makes a voice call.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.