Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Command Resource

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.

Commands enable you can exchange simple machine-to-machine (M2M) messages with SMS-capable devices. Commands have a maximum length of 160 single-byte characters.

To receive and process a Command sent to your device, you will interface with the modem directly, probably using 'AT Commands'. You should consult with the GSM/LTE module manufacturer's documentation on receiving SMS messages. Commands will be sent to your device from the Command short code phone number 000.

At this stage of the Super SIM beta, Commands sent to your devices ("mobile terminated") cannot be delivered if your device is not currently attached to a cellular network. We are working to implement "store and forward" which would allow you to initiate a request to send a Command to your device that will be delivered when the device next attaches to a cellular network.

At this stage of the Super SIM beta, Commands sent from a device ("mobile originated") are not persisted and will not be readable from the Commands API, nor will will you receive a webhook to your Fleet resources CommandsUrl.

Asynchronous Resource

The Command resource performs Asynchronous Operations.

During a later stage of the Super SIM Beta, you will be able to receive an asynchronous notification when a Command resource has finished updating by providing a callback URL and optionally a callback method parameter with your initial HTTP request to send a Command.

Command properties

Resource Properties in REST API format
sid<HC> Not PII

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

sid<AC> Not PII

The SID of the Account that created the Command resource.

sid<HS> Not PII

The SID of the SIM that this Command was sent to or from.


The message body of the command sent to or from the SIM. For text mode messages, this can be up to 160 characters.

enum:status Not PII

The status of the Command. Can be: queued, sent, delivered, received or failed. See the Command Status Values for a description of each.

enum:direction Not PII

The direction of the Command. Can be to_sim or from_sim. The value of to_sim is synonymous with the term mobile terminated, and from_sim is synonymous with the term mobile originated.

date_time<iso8601> Not PII

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

date_time<iso8601> Not PII

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

url Not PII

The absolute URL of the Command resource.

Create a Command resource

Parameters in REST API format
post sid<HS> Not PII

The sid or unique_name of the SIM to send the Command to.

post string PII MTL: 30 DAYS

The message body of the command.

post http_method Not PII

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

post url Not PII

The URL we should call using the callback_method after we have sent the command.

Example 1
        Rate this page:

        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.