api/python/telnyx-iot-python/SKILL.md
Manage IoT SIM cards, eSIMs, data plans, and wireless connectivity. Use when building IoT/M2M solutions. This skill provides Python SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-iot-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
pip install telnyx
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
All examples below assume client is already initialized as shown above.
Retrieve all wireless regions for the given product.
GET /wireless/regions
response = client.wireless.retrieve_regions(
product="public_ips",
)
print(response.data)
Get all SIM cards belonging to the user that match the given filters.
GET /sim_cards
page = client.sim_cards.list()
page = page.data[0]
print(page.id)
Returns the details regarding a specific SIM card.
GET /sim_cards/{id}
sim_card = client.sim_cards.retrieve(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card.data)
Updates SIM card data
PATCH /sim_cards/{id}
sim_card = client.sim_cards.update(
sim_card_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card.data)
The SIM card will be decommissioned, removed from your account and you will stop being charged.<br />The SIM card won't be able to connect to the network after the deletion is completed, thus makin...
DELETE /sim_cards/{id}
sim_card = client.sim_cards.delete(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card.data)
It returns the activation code for an eSIM.<br/><br/> This API is only available for eSIMs.
GET /sim_cards/{id}/activation_code
response = client.sim_cards.get_activation_code(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
It returns the device details where a SIM card is currently being used.
GET /sim_cards/{id}/device_details
response = client.sim_cards.get_device_details(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
It returns the public IP requested for a SIM card.
GET /sim_cards/{id}/public_ip
response = client.sim_cards.get_public_ip(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API allows listing a paginated collection of Wireless Connectivity Logs associated with a SIM Card, for troubleshooting purposes.
GET /sim_cards/{id}/wireless_connectivity_logs
page = client.sim_cards.list_wireless_connectivity_logs(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
page = page.data[0]
print(page.id)
This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.<br/> The API will trigger an asynchronous operation called a SIM Card Action.
POST /sim_cards/{id}/actions/disable
response = client.sim_cards.actions.disable(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API enables a SIM card, connecting it to the network and making it possible to consume data.<br/> To enable a SIM card, it must be associated with a SIM card group.<br/> The API will trigger a...
POST /sim_cards/{id}/actions/enable
response = client.sim_cards.actions.enable(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API removes an existing public IP from a SIM card.
POST /sim_cards/{id}/actions/remove_public_ip
response = client.sim_cards.actions.remove_public_ip(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API makes a SIM card reachable on the public internet by mapping a random public IP to the SIM card.
POST /sim_cards/{id}/actions/set_public_ip
response = client.sim_cards.actions.set_public_ip(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
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.<br/> To set a SIM card to standby, it must be ...
POST /sim_cards/{id}/actions/set_standby
response = client.sim_cards.actions.set_standby(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API triggers an asynchronous operation to set a public IP for each of the specified SIM cards.<br/> For each SIM Card a SIM Card Action will be generated.
POST /sim_cards/actions/bulk_set_public_ips — Required: sim_card_ids
response = client.sim_cards.actions.bulk_set_public_ips(
sim_card_ids=["6b14e151-8493-4fa1-8664-1cc4e6d14158"],
)
print(response.data)
It validates whether SIM card registration codes are valid or not.
POST /sim_cards/actions/validate_registration_codes
response = client.sim_cards.actions.validate_registration_codes()
print(response.data)
This API lists a paginated collection of SIM card actions.
GET /sim_card_actions
page = client.sim_cards.actions.list()
page = page.data[0]
print(page.id)
This API fetches detailed information about a SIM card action to follow-up on an existing asynchronous operation.
GET /sim_card_actions/{id}
action = client.sim_cards.actions.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(action.data)
This API lists a paginated collection of bulk SIM card actions.
GET /bulk_sim_card_actions
page = client.bulk_sim_card_actions.list()
page = page.data[0]
print(page.id)
This API fetches information about a bulk SIM card action.
GET /bulk_sim_card_actions/{id}
bulk_sim_card_action = client.bulk_sim_card_actions.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(bulk_sim_card_action.data)
Get all SIM card groups belonging to the user that match the given filters.
GET /sim_card_groups
page = client.sim_card_groups.list()
page = page.data[0]
print(page.id)
Creates a new SIM card group object
POST /sim_card_groups — Required: name
sim_card_group = client.sim_card_groups.create(
name="My Test Group",
)
print(sim_card_group.data)
Returns the details regarding a specific SIM card group
GET /sim_card_groups/{id}
sim_card_group = client.sim_card_groups.retrieve(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_group.data)
Updates a SIM card group
PATCH /sim_card_groups/{id}
sim_card_group = client.sim_card_groups.update(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_group.data)
Permanently deletes a SIM card group
DELETE /sim_card_groups/{id}
sim_card_group = client.sim_card_groups.delete(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_group.data)
This action will asynchronously remove an existing Private Wireless Gateway definition from a SIM card group.
POST /sim_card_groups/{id}/actions/remove_private_wireless_gateway
response = client.sim_card_groups.actions.remove_private_wireless_gateway(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This action will asynchronously remove an existing Wireless Blocklist to all the SIMs in the SIM card group.
POST /sim_card_groups/{id}/actions/remove_wireless_blocklist
response = client.sim_card_groups.actions.remove_wireless_blocklist(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This action will asynchronously assign a provisioned Private Wireless Gateway to the SIM card group.
POST /sim_card_groups/{id}/actions/set_private_wireless_gateway — Required: private_wireless_gateway_id
response = client.sim_card_groups.actions.set_private_wireless_gateway(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
private_wireless_gateway_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This action will asynchronously assign a Wireless Blocklist to all the SIMs in the SIM card group.
POST /sim_card_groups/{id}/actions/set_wireless_blocklist — Required: wireless_blocklist_id
response = client.sim_card_groups.actions.set_wireless_blocklist(
id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
wireless_blocklist_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(response.data)
This API allows listing a paginated collection a SIM card group actions.
GET /sim_card_group_actions
page = client.sim_card_groups.actions.list()
page = page.data[0]
print(page.id)
This API allows fetching detailed information about a SIM card group action resource to make follow-ups in an existing asynchronous operation.
GET /sim_card_group_actions/{id}
action = client.sim_card_groups.actions.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(action.data)
Get all SIM card orders according to filters.
GET /sim_card_orders
page = client.sim_card_orders.list()
page = page.data[0]
print(page.id)
Creates a new order for SIM cards.
POST /sim_card_orders — Required: address_id, quantity
sim_card_order = client.sim_card_orders.create(
address_id="1293384261075731499",
quantity=23,
)
print(sim_card_order.data)
Get a single SIM card order by its ID.
GET /sim_card_orders/{id}
sim_card_order = client.sim_card_orders.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_order.data)
Preview SIM card order purchases.
POST /sim_card_order_preview — Required: quantity, address_id
response = client.sim_card_order_preview.preview(
address_id="1293384261075731499",
quantity=21,
)
print(response.data)
Lists a paginated collection of SIM card data usage notifications.
GET /sim_card_data_usage_notifications
page = client.sim_card_data_usage_notifications.list()
page = page.data[0]
print(page.id)
Creates a new SIM card data usage notification.
POST /sim_card_data_usage_notifications — Required: sim_card_id, threshold
sim_card_data_usage_notification = client.sim_card_data_usage_notifications.create(
sim_card_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
threshold={},
)
print(sim_card_data_usage_notification.data)
Get a single SIM Card Data Usage Notification.
GET /sim_card_data_usage_notifications/{id}
sim_card_data_usage_notification = client.sim_card_data_usage_notifications.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_data_usage_notification.data)
Updates information for a SIM Card Data Usage Notification.
PATCH /sim_card_data_usage_notifications/{id}
sim_card_data_usage_notification = client.sim_card_data_usage_notifications.update(
sim_card_data_usage_notification_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_data_usage_notification.data)
Delete the SIM Card Data Usage Notification.
DELETE /sim_card_data_usage_notifications/{id}
sim_card_data_usage_notification = client.sim_card_data_usage_notifications.delete(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_data_usage_notification.data)
Purchases and registers the specified amount of eSIMs to the current user's account.<br/><br/> If <code>sim_card_group_id</code> is provided, the eSIMs will be associated with that group.
POST /actions/purchase/esims — Required: amount
purchase = client.actions.purchase.create(
amount=10,
)
print(purchase.data)
Register the SIM cards associated with the provided registration codes to the current user's account.<br/><br/> If <code>sim_card_group_id</code> is provided, the SIM cards will be associated with ...
POST /actions/register/sim_cards — Required: registration_codes
register = client.actions.register.create(
registration_codes=["0000000001", "0000000002", "0000000003"],
)
print(register.data)
GET /ota_updates
page = client.ota_updates.list()
page = page.data[0]
print(page.id)
This API returns the details of an Over the Air (OTA) update.
GET /ota_updates/{id}
ota_update = client.ota_updates.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(ota_update.data)
Get all Private Wireless Gateways belonging to the user.
GET /private_wireless_gateways
page = client.private_wireless_gateways.list()
page = page.data[0]
print(page.id)
Asynchronously create a Private Wireless Gateway for SIM cards for a previously created network.
POST /private_wireless_gateways — Required: network_id, name
private_wireless_gateway = client.private_wireless_gateways.create(
name="My private wireless gateway",
network_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(private_wireless_gateway.data)
Retrieve information about a Private Wireless Gateway.
GET /private_wireless_gateways/{id}
private_wireless_gateway = client.private_wireless_gateways.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(private_wireless_gateway.data)
Deletes the Private Wireless Gateway.
DELETE /private_wireless_gateways/{id}
private_wireless_gateway = client.private_wireless_gateways.delete(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(private_wireless_gateway.data)
Get all Wireless Blocklists belonging to the user.
GET /wireless_blocklists
page = client.wireless_blocklists.list()
page = page.data[0]
print(page.id)
Create a Wireless Blocklist to prevent SIMs from connecting to certain networks.
POST /wireless_blocklists — Required: name, type, values
wireless_blocklist = client.wireless_blocklists.create(
name="My Wireless Blocklist",
type="country",
values=["CA", "US"],
)
print(wireless_blocklist.data)
Update a Wireless Blocklist.
PATCH /wireless_blocklists
wireless_blocklist = client.wireless_blocklists.update()
print(wireless_blocklist.data)
Retrieve information about a Wireless Blocklist.
GET /wireless_blocklists/{id}
wireless_blocklist = client.wireless_blocklists.retrieve(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(wireless_blocklist.data)
Deletes the Wireless Blocklist.
DELETE /wireless_blocklists/{id}
wireless_blocklist = client.wireless_blocklists.delete(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(wireless_blocklist.data)
Retrieve all wireless blocklist values for a given blocklist type.
GET /wireless_blocklist_values
wireless_blocklist_values = client.wireless_blocklist_values.list(
type="country",
)
print(wireless_blocklist_values.data)
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.