import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCard = await client.simCards.delete('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(simCard.data);{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
],
"current_imei": "457032284023794",
"data_limit": {
"amount": "2048.1",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"ipv4": "192.168.0.0",
"ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
"current_device_location": {
"latitude": "41.143",
"longitude": "-8.605",
"accuracy": 1250,
"accuracy_unit": "m"
},
"current_mnc": "260",
"current_mcc": "410",
"live_data_session": "connected",
"pin_puk_codes": {
"pin1": "1234",
"pin2": "5678",
"puk1": "12345678",
"puk2": "87654321"
},
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null
}
}The SIM card will be decommissioned, removed from your account and you will stop being charged.
The SIM card won’t be able to connect to the network after the deletion is completed, thus making it impossible to consume data.
Transitioning to the disabled state may take a period of time.
Until the transition is completed, the SIM card status will be disabling disabling.
In order to re-enable the SIM card, you will need to re-register it.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const simCard = await client.simCards.delete('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(simCard.data);{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
],
"current_imei": "457032284023794",
"data_limit": {
"amount": "2048.1",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"ipv4": "192.168.0.0",
"ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
"current_device_location": {
"latitude": "41.143",
"longitude": "-8.605",
"accuracy": 1250,
"accuracy_unit": "m"
},
"current_mnc": "260",
"current_mcc": "410",
"live_data_session": "connected",
"pin_puk_codes": {
"pin1": "1234",
"pin2": "5678",
"puk1": "12345678",
"puk2": "87654321"
},
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the SIM.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Enables deletion of disabled eSIMs that can't be uninstalled from a device. This is irreversible and the eSIM cannot be re-registered.
Successful response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
"sim_card"
Show child attributes
The current status of the SIM card. It will be one of the following: <br/>
<ul> <li><code>registering</code> - the card is being registered</li> <li><code>enabling</code> - the card is being enabled</li> <li><code>enabled</code> - the card is enabled and ready for use</li> <li><code>disabling</code> - the card is being disabled</li> <li><code>disabled</code> - the card has been disabled and cannot be used</li> <li><code>data_limit_exceeded</code> - the card has exceeded its data consumption limit</li> <li><code>setting_standby</code> - the process to set the card in stand by is in progress</li> <li><code>standby</code> - the card is in stand by</li> </ul> Transitioning between the enabled and disabled states may take a period of time.registering, enabling, enabled, disabling, disabled, data_limit_exceeded, setting_standby, standby "enabled"
It describes why the SIM card is in the current status.
"The SIM card is active, ready to connect to networks and consume data."
The type of SIM card
physical, esim "physical"
The ICCID is the identifier of the specific SIM card/chip. Each SIM is internationally identified by its integrated circuit card identifier (ICCID). ICCIDs are stored in the SIM card's memory and are also engraved or printed on the SIM card body during a process called personalization.
"89310410106543789301"
SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI). <br/> Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR).
"081932214823362973"
Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. <br/> MSISDN is defined by the E.164 numbering plan. It includes a country code and a National Destination Code which identifies the subscriber's operator.
"+13109976224"
The group SIMCardGroup identification. This attribute can be <code>null</code> when it's present in an associated resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Searchable tags associated with the SIM card
["personal", "customers", "active-customers"]List of IMEIs authorized to use a given SIM card.
[
"106516771852751",
"534051870479563",
"508821468377961"
]IMEI of the device where a given SIM card is currently being used.
"457032284023794"
Indicate whether the SIM card has any pending (in-progress) actions.
true
ISO 8601 formatted date-time indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
The SIM's address in the currently connected network. This IPv4 address is usually obtained dynamically, so it may vary according to the location or new connections.
"192.168.0.0"
The SIM's address in the currently connected network. This IPv6 address is usually obtained dynamically, so it may vary according to the location or new connections.
"2001:cdba:0000:0000:0000:0000:3257:9652"
Current physical location data of a given SIM card. Accuracy is given in meters.
Mobile Network Code of the current network to which the SIM card is connected. It's a two to three decimal digits that identify a network.<br/><br/> This code is commonly seen joined with a Mobile Country Code (MCC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code.
"260"
Mobile Country Code of the current network to which the SIM card is connected. It's a three decimal digit that identifies a country.<br/><br/> This code is commonly seen joined with a Mobile Network Code (MNC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code.
"410"
Indicates whether the device is actively connected to a network and able to run data.
connected, disconnected, unknown "connected"
PIN and PUK codes for the SIM card. Only available when include_pin_puk_codes=true is set in the request.
Show child attributes
The primary Personal Identification Number (PIN) for the SIM card. This is a 4-digit code used to protect the SIM card from unauthorized use.
"1234"
The secondary Personal Identification Number (PIN2) for the SIM card. This is a 4-digit code used for additional security features.
"5678"
The primary Personal Unblocking Key (PUK1) for the SIM card. This is an 8-digit code used to unlock the SIM card if PIN1 is entered incorrectly multiple times.
"12345678"
The secondary Personal Unblocking Key (PUK2) for the SIM card. This is an 8-digit code used to unlock the SIM card if PIN2 is entered incorrectly multiple times.
"87654321"
The installation status of the eSIM. Only applicable for eSIM cards.
released, disabled "released"
The version of the SIM card.
"4.3"
List of resources with actions in progress.
[]The Embedded Identity Document (eID) for eSIM cards.
null
Was this page helpful?