This API allows dispatching the same operation described for the PUT sim_cards/:sim_card_id/network_preferences API for multiple SIM cards at once.
Although, a SIM card network preference may fail individually under any validation triggered as a consequence of its state. For example, a SIM can't have an in-progress OTA update for applying a Network Preference, so they'll fail when requested in this API. In that scenario, the specific error will be present in the response along with the successful definitions in the "errors" response node.
Array of objects (SIMCardNetworkPreferenceWithOTAUpdates) Multi requested SIM cards network preferences. | |
Array of objects (Error) |
{- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "priority": 0
}
], - "sim_card_ids": [
- "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "6b14e151-8493-4fa1-8664-1cc4e6d14158"
]
}
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
], - "ota_updates": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "ota_update",
- "settings": {
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
]
}, - "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "in-progress",
- "type": "sim_card_network_preferences",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "record_type": "sim_card_network_preferences",
- "sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "errors": [
- {
- "code": "string",
- "detail": "string",
- "meta": { },
- "source": {
- "parameter": "string",
- "pointer": "/json/pointer"
}, - "title": "string"
}
]
}
Register the SIM cards associated with the provided registration codes to the current user's account.
If sim_card_group_id
is provided, the SIM cards will be associated with that group. Otherwise, the default group for the current user will be used.
Successful response
Array of objects (SIMCard) Successfully registered SIM cards. | |
Array of objects (Error) |
{- "registration_codes": [
- "0000000001",
- "0000000002",
- "0000000003"
], - "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "standby",
- "tags": [
- "personal",
- "customers",
- "active-customers"
]
}
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "current_billing_period_consumed_data": {
- "amount": "2049.0",
- "unit": "MB"
}, - "data_limit": {
- "amount": "2048.0",
- "unit": "MB"
}, - "iccid": "89310410106543789301",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "imsi": 81932214823362980,
- "msisdn": "+13109976224",
- "record_type": "sim_card",
- "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The SIM card is active, ready to connect to networks and consume data.",
- "value": "enabled"
}, - "tags": [
- "personal",
- "customers",
- "active-customers"
], - "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "errors": [
- {
- "code": "string",
- "detail": "string",
- "meta": { },
- "source": {
- "parameter": "string",
- "pointer": "/json/pointer"
}, - "title": "string"
}
]
}
Lists a paginated collection of SIM card data usage notifications. It enables exploring the collection using specific filters.
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Creates a new SIM card data usage notification.
Successful response
{- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "threshold": {
- "amount": "2048.1",
- "unit": "MB"
}
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Delete the SIM Card Data Usage Notification.
Successful response
object (SimCardDataUsageNotification) The SIM card individual data usage notification information. | |||||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Get a single SIM Card Data Usage Notification.
Successful response
object (SimCardDataUsageNotification) The SIM card individual data usage notification information. | |||||||||||||
|
Resource not found
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Updates information for a SIM Card Data Usage Notification.
Successful response
object (SimCardDataUsageNotification) The SIM card individual data usage notification information. | |||||||||||||
|
{- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "79228acc-3f08-4e70-ac68-cb5aae8b537a",
- "sim_card_id": "b34c1683-cd85-4493-b9a5-315eb4bc5e19",
- "threshold": {
- "amount": "2048.0",
- "unit": "MB"
}, - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Get all SIM cards belonging to the user that match the given filters.
page[number] | integer >= 1 Default: 1 The page number to load |
page[size] | integer [ 1 .. 250 ] Default: 20 The size of the page |
include_sim_card_group | boolean Default: false It includes the associated SIM card group object in the response when present. Example: include_sim_card_group=true |
filter[sim_card_group_id] | string <uuid> A valid SIM card group ID. Example: filter[sim_card_group_id]=47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9 |
filter[tags] | Array of strings A list of SIM card tags to filter on.
['customers', 'test'] returns only the first because it's the only one with both tags.Searching for test returns the first two SIMs, because both of them have such tag.Searching for customers returns the first and last SIMs. Example: filter[tags]=personal&filter[tags]=customers&filter[tags]=active-customers |
filter[iccid] | string A search string to partially match for the SIM card's ICCID. Example: filter[iccid]=89310410106543789301 |
filter[status] | Array of strings Filter by a SIM card's status. |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.SIMCard.list(page={"number":1,"size":20})
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "current_billing_period_consumed_data": {
- "amount": "2049.0",
- "unit": "MB"
}, - "data_limit": {
- "amount": "2048.0",
- "unit": "MB"
}, - "iccid": "89310410106543789301",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "imsi": 81932214823362980,
- "msisdn": "+13109976224",
- "record_type": "sim_card",
- "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The SIM card is active, ready to connect to networks and consume data.",
- "value": "enabled"
}, - "tags": [
- "personal",
- "customers",
- "active-customers"
], - "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
This API triggers an asynchronous operation to set a public IP for each of the specified SIM cards.
For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (BulkSIMCardAction) This object represents a bulk SIM card action. It groups SIM card actions created through a bulk endpoint under a single resource for further lookup. | |||||||||||||
|
{- "sim_card_ids": [
- "6b14e151-8493-4fa1-8664-1cc4e6d14158"
]
}
{- "data": {
- "action_type": "bulk_set_public_ips",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "bulk_sim_card_action",
- "settings": { },
- "updated_at": "2020-02-03T22:25:27.521Z"
}
}
It validates whether SIM card registration codes are valid or not.
Successful
{- "registration_codes": [
- "123456780",
- "1231231230"
]
}
{- "data": [
- {
- "invalid_detail": "This code has already been used.",
- "record_type": "sim_card_registration_code_validation",
- "registration_code": 123456789,
- "valid": false
}
]
}
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.
Successful response
object (SIMCard) | |||||||||||||||||||||||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" res = telnyx.SIMCard.retrieve("id") res.delete()
{- "data": {
- "authorized_imeis": [
- "106516771852751",
- "534051870479563",
- "508821468377961"
], - "created_at": "2018-02-02T22:25:27.521Z",
- "current_billing_period_consumed_data": {
- "amount": "2049.0",
- "unit": "MB"
}, - "current_device_location": {
- "accuracy": 1250,
- "accuracy_unit": "m",
- "latitude": "41.143",
- "longitude": "-8.605"
}, - "current_imei": "457032284023794",
- "current_mcc": "410",
- "current_mnc": "260",
- "data_limit": {
- "amount": "2048.1",
- "unit": "MB"
}, - "iccid": "89310410106543789301",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "imsi": 81932214823362980,
- "ipv4": "192.168.0.0",
- "ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
- "live_data_session": "connected",
- "msisdn": "+13109976224",
- "record_type": "sim_card",
- "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The SIM card is active, ready to connect to networks and consume data.",
- "value": "enabled"
}, - "tags": [
- "personal",
- "customers",
- "active-customers"
], - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Returns the details regarding a specific SIM card.
Successful response
object (SIMCard) | |||||||||||||||||||||||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.SIMCard.retrieve("id",include_sim_card_group=True)
{- "data": {
- "authorized_imeis": [
- "106516771852751",
- "534051870479563",
- "508821468377961"
], - "created_at": "2018-02-02T22:25:27.521Z",
- "current_billing_period_consumed_data": {
- "amount": "2049.0",
- "unit": "MB"
}, - "current_device_location": {
- "accuracy": 1250,
- "accuracy_unit": "m",
- "latitude": "41.143",
- "longitude": "-8.605"
}, - "current_imei": "457032284023794",
- "current_mcc": "410",
- "current_mnc": "260",
- "data_limit": {
- "amount": "2048.1",
- "unit": "MB"
}, - "iccid": "89310410106543789301",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "imsi": 81932214823362980,
- "ipv4": "192.168.0.0",
- "ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
- "live_data_session": "connected",
- "msisdn": "+13109976224",
- "record_type": "sim_card",
- "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The SIM card is active, ready to connect to networks and consume data.",
- "value": "enabled"
}, - "tags": [
- "personal",
- "customers",
- "active-customers"
], - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
Updates SIM card data
authorized_imeis | Array of strings <int64> List of IMEIs authorized to use a given SIM card. |
object The SIM card individual data limit configuration. | |
sim_card_group_id | string <uuid> The group SIMCardGroup identification. This attribute can be |
object (SIMCardStatus) | |
tags | Array of strings Searchable tags associated with the SIM card |
Successful response
object (SIMCard) | |||||||||||||||||||||||||||||||||||||||||
|
{- "authorized_imeis": [
- "106516771852751",
- "534051870479563",
- "508821468377961"
], - "data_limit": {
- "amount": "2048.1",
- "unit": "MB"
}, - "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": { },
- "tags": [
- "personal",
- "customers",
- "active-customers"
]
}
{- "data": {
- "authorized_imeis": [
- "106516771852751",
- "534051870479563",
- "508821468377961"
], - "created_at": "2018-02-02T22:25:27.521Z",
- "current_billing_period_consumed_data": {
- "amount": "2049.0",
- "unit": "MB"
}, - "current_device_location": {
- "accuracy": 1250,
- "accuracy_unit": "m",
- "latitude": "41.143",
- "longitude": "-8.605"
}, - "current_imei": "457032284023794",
- "current_mcc": "410",
- "current_mnc": "260",
- "data_limit": {
- "amount": "2048.1",
- "unit": "MB"
}, - "iccid": "89310410106543789301",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "imsi": 81932214823362980,
- "ipv4": "192.168.0.0",
- "ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
- "live_data_session": "connected",
- "msisdn": "+13109976224",
- "record_type": "sim_card",
- "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The SIM card is active, ready to connect to networks and consume data.",
- "value": "enabled"
}, - "tags": [
- "personal",
- "customers",
- "active-customers"
], - "updated_at": "2018-02-02T22:25:27.521Z"
}
}
This API deletes network preferences for a SIM card.
The API will trigger an asynchronous operation called a SIM Card Action. Creating network preferences may take a period of time. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
Unprocessable entity. Check the 'detail' field in response for details.
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.
The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the disabled state may take a period of time. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: simCard } = await telnyx.simCards.retrieve('123'); await simCard.disable();
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
This API enables a SIM card, connecting it to the network and making it possible to consume data.
To enable a SIM card, it must be associated with a SIM card group.
The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the enabled state may take a period of time. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
Unprocessable entity. Check the 'detail' field in response for details.
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: simCard } = await telnyx.simCards.retrieve('123'); await simCard.enable();
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
This API removes an existing public IP from a SIM card.
The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
This API sets network preferences for a SIM card.
Every SIM card has default network preferences defined on Telnyx. These preferences will determine how a SIMCard will connect to the network by considering a list of preferable operators.
The SIM card needs to be attached to the network so this can connect and SMS must be available, otherwise, the operation will fail. This preference will only be respected if the network is available, otherwise the strongest signal will be used.
The API will trigger an asynchronous operation called a SIM Card Action. Creating network preferences may take a period of time. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
Unprocessable entity. Check the 'detail' field in response for details.
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
This API makes a SIM card reachable on the public internet by mapping a random public IP to the SIM card.
The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Setting a Public IP to a SIM Card incurs a charge and will only succeed if the account has sufficient funds.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
The SIM card will be able to connect to the network once the process to set it to standby has been completed, thus making it possible to consume data.
To set a SIM card to standby, it must be associated with SIM card group.
The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the standby state may take a period of time. The status of the SIM Card Action can be followed through the List SIM Card Action API.
Successful Response
object (SIMCardAction) This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card. | |||||||||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: simCard } = await telnyx.simCards.retrieve('123'); await simCard.setStandby();
{- "data": {
- "action_type": "enable",
- "created_at": "2020-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "sim_card_action",
- "settings": { },
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": {
- "reason": "The data limit was exceeded.",
- "value": "completed"
}, - "updated_at": "2020-02-03T22:25:27.521Z"
}
}
It returns the device details where a SIM card is currently being used.
Successful response
object (SIMCardDeviceDetails) | |||||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data } = await telnyx.simCards.deviceDetails.retrieve('sim_card_id');
{- "data": {
- "brand_name": "Apple",
- "device_type": "Tablet",
- "imei": "457032284023794",
- "model_name": "iPad Pro 11 2020 Cellular",
- "operating_system": "iOS 12",
- "record_type": "device_details"
}
}
This API asynchronously removes the custom-defined network preferences settings. After this operation is done the Telnyx default settings, the same applied for an unaltered SIM card, will be in place.
A successful network preferences deletion response.
The delete won't be done right away - this is an asynchronous operation. The request will return the resource with an in-progress OTA update resource (in the ota_updates node) representing the delete operation. Similarly to the PUT API, the resource will only be deleted when the OTA updated is successfully completed.
object (SIMCardNetworkPreferenceWithOTAUpdates) | |||||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
], - "ota_updates": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "ota_update",
- "settings": {
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
]
}, - "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "in-progress",
- "type": "sim_card_network_preferences",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "record_type": "sim_card_network_preferences",
- "sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
}
It returns the network preferences currently applied in the SIM card.
A successful network preferences definition response.
object (SIMCardNetworkPreferenceWithOTAUpdates) | |||||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
], - "ota_updates": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "ota_update",
- "settings": {
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
]
}, - "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "in-progress",
- "type": "sim_card_network_preferences",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "record_type": "sim_card_network_preferences",
- "sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
}
This API allows setting or updating a SIM card network preference.
Every SIM card has default network preferences defined on Telnyx. These preferences will determine how a SIMCard will connect to the network by considering a list of preferable operators.
There can be multiple scenarios where an operator can be preferred over another, for example, when a specific mobile operator can provide better network latency or better pricing.
Array of objects (MobileOperatorNetworkPreferencesRequest) A list of mobile operator networks and the priority that should be applied when the SIM is connecting to the network. | |||||
Array
|
A successful network preferences definition response.
The sent mobile_operator_networks_preferences parameter won't be applied to the main resource right away - this is an asynchronous operation. While interacting with this API, you will face the following scenarios:
The returned OTA updated (present in the ota_updates node) will, by default, be the resource related to the operation, not all of them.
object (SIMCardNetworkPreferenceWithOTAUpdates) | |||||||||||||
|
{- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "priority": 0
}
]
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
], - "ota_updates": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "ota_update",
- "settings": {
- "mobile_operator_networks_preferences": [
- {
- "mobile_operator_network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "mobile_operator_network_name": "AT&T Mobility (USACG)",
- "priority": 0
}
]
}, - "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "in-progress",
- "type": "sim_card_network_preferences",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
], - "record_type": "sim_card_network_preferences",
- "sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
}
It returns the public IP requested for a SIM card.
Successful response
object (SIMCardPublicIP) | |||||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const {data: simCard} = await telnyx.simCards.retrieve('123'); const {data: publicIPInfo} = await simCard.retrievePublicIP();
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "ip": "192.168.0.0",
- "record_type": "sim_card_public_ip",
- "sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
- "type": "ipv4",
- "updated_at": "2018-02-02T22:25:27.521Z"
}
}
This API allows listing a paginated collection of Wireless Connectivity Logs associated with a SIM Card, for troubleshooting purposes.
{- "data": [
- {
- "apn": "data00.telnyx",
- "cell_id": "311210-6813",
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": 137509451,
- "imei": "490154203237518",
- "imsi": 81932214823362980,
- "ipv4": "192.168.0.0",
- "ipv6": "2001:cdba:0000:0000:0000:0000:3257:9652",
- "last_seen": "2018-02-02T22:25:27.521Z",
- "log_type": "registration",
- "mobile_country_code": "310",
- "mobile_network_code": "410",
- "radio_access_technology": "LTE",
- "record_type": "wireless_connectivity_log",
- "sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "start_time": "2018-02-02T22:25:27.521Z",
- "state": "provisioned",
- "stop_time": "2018-02-02T22:25:27.521Z"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}