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

POST /v1/Sims/{Sid}

A resource representing a Programmable Wireless SIM

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

Path parameters

  • Sid string Required

    The SID or the unique_name of the Sim resource to update.

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 sid in the URL path to address the resource.

  • CallbackMethod string(http-method)

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

    Values are GET or POST.

  • CallbackUrl string(uri)

    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).

  • FriendlyName string

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

  • RatePlan string

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

  • Status string

    The status of the Sim resource. Can be: new, ready, active, deactivated, canceled, deleted, scheduled, or updating. See Status Values for the description of each status.

    Values are new, ready, active, suspended, deactivated, canceled, scheduled, or updating.

  • CommandsCallbackMethod string(http-method)

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

    Values are GET or POST.

  • CommandsCallbackUrl string(uri)

    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.

  • SmsFallbackMethod string(http-method)

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

    Values are GET or POST.

  • SmsFallbackUrl string(uri)

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

  • SmsMethod string(http-method)

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

    Values are GET or POST.

  • SmsUrl string(uri)

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

  • VoiceFallbackMethod string(http-method)

    Deprecated.

    Values are GET or POST.

  • VoiceFallbackUrl string(uri)

    Deprecated.

  • VoiceMethod string(http-method)

    Deprecated.

    Values are GET or POST.

  • VoiceUrl string(uri)

    Deprecated.

  • ResetStatus string

    The connectivity reset status of the SIM. Can be: null or resetting. When a connectivity reset is initiated on a SIM, this property is resetting. After the reset completes, it is null.

    Value is resetting.

  • AccountSid string

    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.

Responses

  • 200 application/json

    OK

    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 Sim resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^DE[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 to which the Sim resource belongs.

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

    • rate_plan_sid string | null

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

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

    • friendly_name string | null

      The string that you assigned to describe the Sim resource.

    • iccid string | null

      The ICCID associated with the SIM.

    • e_id string | null

      Deprecated.

    • status string

      The status of the Sim resource. Can be: new, ready, active, deactivated, canceled, deleted, scheduled, or updating. See Status Values for the description of each status.

      Values are new, ready, active, suspended, deactivated, canceled, scheduled, or updating.

    • reset_status string

      The connectivity reset status of the SIM. Can be: null or resetting. When a connectivity reset is initiated on a SIM, this property is resetting. After the reset completes, it is null.

      Value is resetting.

    • commands_callback_url string(uri) | null

      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.

    • commands_callback_method string(http-method) | null

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

      Values are GET or POST.

    • sms_fallback_method string(http-method) | null

      Deprecated.

      Values are GET or POST.

    • sms_fallback_url string(uri) | null

      Deprecated.

    • sms_method string(http-method) | null

      Deprecated.

      Values are GET or POST.

    • sms_url string(uri) | null

      Deprecated.

    • voice_fallback_method string(http-method) | null

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

      Values are GET or POST.

    • voice_fallback_url string(uri) | null

      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 string(http-method) | null

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

      Values are GET or POST.

    • voice_url string(uri) | null

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

    • 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 Sim resource was last updated specified in ISO 8601 format.

    • url string(uri) | null

      The absolute URL of the resource.

    • ip_address string | null

      Deprecated.

POST /v1/Sims/{Sid}
curl \
 --request POST 'https://wireless.twilio.com/v1/Sims/{Sid}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'SmsUrl=http%3A%2F%2Fwww.example.com&Status=new&RatePlan=WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&VoiceUrl=http%3A%2F%2Fwww.example.com&SmsMethod=POST&UniqueName=unique_name&CallbackUrl=http%3A%2F%2Fwww.example.com&VoiceMethod=POST&FriendlyName=friendly_name&CallbackMethod=callback_method&SmsFallbackUrl=http%3A%2F%2Fwww.example.com&VoiceFallbackUrl=http%3A%2F%2Fwww.example.com&SmsFallbackMethod=POST&CommandsCallbackUrl=http%3A%2F%2Fwww.example.com&VoiceFallbackMethod=POST&CommandsCallbackMethod=POST'
{"SmsUrl"=>"http://www.example.com", "Status"=>"new", "RatePlan"=>"WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "VoiceUrl"=>"http://www.example.com", "SmsMethod"=>"POST", "UniqueName"=>"unique_name", "CallbackUrl"=>"http://www.example.com", "VoiceMethod"=>"POST", "FriendlyName"=>"friendly_name", "CallbackMethod"=>"callback_method", "SmsFallbackUrl"=>"http://www.example.com", "VoiceFallbackUrl"=>"http://www.example.com", "SmsFallbackMethod"=>"POST", "CommandsCallbackUrl"=>"http://www.example.com", "VoiceFallbackMethod"=>"POST", "CommandsCallbackMethod"=>"POST"}
{"Status"=>"new", "RatePlan"=>"WPbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "AccountSid"=>"ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "UniqueName"=>"unique_name"}
{"ResetStatus"=>"resetting"}
{
  "sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "e_id": "e_id",
  "iccid": "iccid",
  "links": {
    "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
    "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
  },
  "status": "new",
  "sms_url": "http://www.example.com",
  "voice_url": "http://www.example.com",
  "ip_address": "192.168.1.30",
  "sms_method": "POST",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "unique_name": "unique_name",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "reset_status": null,
  "voice_method": "POST",
  "friendly_name": "friendly_name",
  "rate_plan_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sms_fallback_url": "http://www.example.com",
  "voice_fallback_url": "http://www.example.com",
  "sms_fallback_method": "POST",
  "commands_callback_url": "http://www.example.com",
  "voice_fallback_method": "POST",
  "commands_callback_method": "POST"
}
{
  "sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "e_id": "e_id",
  "iccid": "iccid",
  "links": {
    "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
    "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
  },
  "status": "new",
  "sms_url": "http://www.example.com",
  "voice_url": "http://www.example.com",
  "ip_address": "192.168.1.30",
  "sms_method": "POST",
  "account_sid": "ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "unique_name": "unique_name",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "reset_status": null,
  "voice_method": "POST",
  "friendly_name": "friendly_name",
  "rate_plan_sid": "WPbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "sms_fallback_url": "http://www.example.com",
  "voice_fallback_url": "http://www.example.com",
  "sms_fallback_method": "POST",
  "commands_callback_url": "http://www.example.com",
  "voice_fallback_method": "POST",
  "commands_callback_method": "POST"
}
{
  "sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "e_id": "e_id",
  "iccid": "iccid",
  "links": {
    "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
    "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
  },
  "status": "active",
  "sms_url": "http://www.example.com",
  "voice_url": "http://www.example.com",
  "ip_address": "192.168.1.30",
  "sms_method": "POST",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "unique_name": "unique_name",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "reset_status": "resetting",
  "voice_method": "POST",
  "friendly_name": "friendly_name",
  "rate_plan_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sms_fallback_url": "http://www.example.com",
  "voice_fallback_url": "http://www.example.com",
  "sms_fallback_method": "POST",
  "commands_callback_url": "http://www.example.com",
  "voice_fallback_method": "POST",
  "commands_callback_method": "GET"
}