All URIs are relative to https://api.telnyx.com/v2
Method | HTTP request | Description |
---|---|---|
bulkSimCardNetworkPreferences | PUT /actions/network_preferences/sim_cards | Bulk Network Preferences for SIM cards |
deleteNetworkPreferences | POST /sim_cards/{id}/actions/delete_network_preferences | Delete network preferences for a SIM card |
deleteSIMCardNetworkPreferences | DELETE /sim_cards/{sim_card_id}/network_preferences | DELETE network preferences |
deleteSimCard | DELETE /sim_cards/{id} | Deletes a SIM card |
deleteSimCardDataUsageNotifications | DELETE /sim_card_data_usage_notifications/{id} | Delete SIM card data usage notifications |
disableSimCard | POST /sim_cards/{id}/actions/disable | Request a SIM card disable |
enableSimCard | POST /sim_cards/{id}/actions/enable | Request a SIM card enable |
getSimCard | GET /sim_cards/{id} | Get SIM card |
getSimCardActivationCode | GET /sim_cards/{sim_card_id}/activation_code | Get activation QR code for an eSIM |
getSimCardDataUsageNotification | GET /sim_card_data_usage_notifications/{id} | Get a single SIM card data usage notification |
getSimCardDeviceDetails | GET /sim_cards/{sim_card_id}/device_details | Get SIM card device details |
getSimCardNetworkPreferences | GET /sim_cards/{sim_card_id}/network_preferences | Get network preferences |
getSimCardPublicIp | GET /sim_cards/{sim_card_id}/public_ip | Get SIM card public IP definition |
getSimCards | GET /sim_cards | Get all SIM cards |
getWirelessConnectivityLogs | GET /sim_cards/{sim_card_id}/wireless_connectivity_logs | List wireless connectivity logs |
listDataUsageNotifications | GET /sim_card_data_usage_notifications | List SIM card data usage notifications |
patchSimCardDataUsageNotification | PATCH /sim_card_data_usage_notifications/{id} | Updates information for a SIM Card Data Usage Notification |
postSimCardDataUsageNotification | POST /sim_card_data_usage_notifications | Create a new SIM card data usage notification |
purchaseESim | POST /actions/purchase/esims | Purchase eSIMs |
putSimCardNetworkPreferences | PUT /sim_cards/{sim_card_id}/network_preferences | Set network preferences |
registerSimCards | POST /actions/register/sim_cards | Register SIM cards |
removeSimCardPublicIp | POST /sim_cards/{id}/actions/remove_public_ip | Request removing a SIM card public IP |
setNetworkPreference | POST /sim_cards/{id}/actions/set_network_preferences | Create or update network preferences for a SIM card |
setNetworkPreferencesBulk | POST /sim_cards/actions/bulk_set_network_preferences | Request bulk setting of network preferences for SIM cards. |
setPublicIPsBulk | POST /sim_cards/actions/bulk_set_public_ips | Request bulk setting SIM card public IPs. |
setSimCardPublicIp | POST /sim_cards/{id}/actions/set_public_ip | Request setting a SIM card public IP |
setSimCardStandby | POST /sim_cards/{id}/actions/set_standby | Request setting a SIM card to standby |
updateSimCard | PATCH /sim_cards/{id} | Update a SIM card |
validateRegistrationCodes | POST /sim_cards/actions/validate_registration_codes | Validate SIM cards registration codes |
BulkSimCardNetworkPreferences202Response bulkSimCardNetworkPreferences(bulkSimCardNetworkPreferencesRequest)
Bulk Network Preferences for SIM cards
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.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
BulkSimCardNetworkPreferencesRequest bulkSimCardNetworkPreferencesRequest = new BulkSimCardNetworkPreferencesRequest(); // BulkSimCardNetworkPreferencesRequest |
try {
BulkSimCardNetworkPreferences202Response result = apiInstance.bulkSimCardNetworkPreferences(bulkSimCardNetworkPreferencesRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#bulkSimCardNetworkPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
bulkSimCardNetworkPreferencesRequest | BulkSimCardNetworkPreferencesRequest | [optional] |
BulkSimCardNetworkPreferences202Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | - | |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
GetSimCardAction200Response deleteNetworkPreferences(id)
Delete network preferences for a SIM card
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.deleteNetworkPreferences(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#deleteNetworkPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
0 | Unexpected error | - |
GetSimCardNetworkPreferences200Response deleteSIMCardNetworkPreferences(simCardId)
DELETE network preferences
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
try {
GetSimCardNetworkPreferences200Response result = apiInstance.deleteSIMCardNetworkPreferences(simCardId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#deleteSIMCardNetworkPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. |
GetSimCardNetworkPreferences200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | A successful network preferences deletion response. <br/><br/> 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. | - |
0 | Unexpected error | - |
GetSimCard200Response deleteSimCard(id)
Deletes a SIM card
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 java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCard200Response result = apiInstance.deleteSimCard(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#deleteSimCard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
PostSimCardDataUsageNotification201Response deleteSimCardDataUsageNotifications(id)
Delete SIM card data usage notifications
Delete the SIM Card Data Usage Notification.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
PostSimCardDataUsageNotification201Response result = apiInstance.deleteSimCardDataUsageNotifications(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#deleteSimCardDataUsageNotifications");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
PostSimCardDataUsageNotification201Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetSimCardAction200Response disableSimCard(id)
Request a SIM card disable
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.disableSimCard(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#disableSimCard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
0 | Unexpected error | - |
GetSimCardAction200Response enableSimCard(id)
Request a SIM card enable
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.enableSimCard(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#enableSimCard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
0 | Unexpected error | - |
GetSimCard200Response getSimCard(id, includeSimCardGroup)
Get SIM card
Returns the details regarding a specific SIM card.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
Boolean includeSimCardGroup = false; // Boolean | It includes the associated SIM card group object in the response when present.
try {
GetSimCard200Response result = apiInstance.getSimCard(id, includeSimCardGroup);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
includeSimCardGroup | Boolean | It includes the associated SIM card group object in the response when present. | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetSimCardActivationCode200Response getSimCardActivationCode(simCardId)
Get activation QR code for an eSIM
It returns the contents for the activation QR code for an eSIM.
This API is only available for eSIMs. If the given SIM is a physical SIM card, or has already been installed, an error will be returned.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
try {
GetSimCardActivationCode200Response result = apiInstance.getSimCardActivationCode(simCardId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCardActivationCode");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. |
GetSimCardActivationCode200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
PostSimCardDataUsageNotification201Response getSimCardDataUsageNotification(id)
Get a single SIM card data usage notification
Get a single SIM Card Data Usage Notification.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
PostSimCardDataUsageNotification201Response result = apiInstance.getSimCardDataUsageNotification(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCardDataUsageNotification");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
PostSimCardDataUsageNotification201Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
404 | Resource not found | - |
0 | Unexpected error | - |
GetSimCardDeviceDetails200Response getSimCardDeviceDetails(simCardId)
Get SIM card device details
It returns the device details where a SIM card is currently being used.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
try {
GetSimCardDeviceDetails200Response result = apiInstance.getSimCardDeviceDetails(simCardId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCardDeviceDetails");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. |
GetSimCardDeviceDetails200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetSimCardNetworkPreferences200Response getSimCardNetworkPreferences(simCardId, includeOtaUpdates)
Get network preferences
It returns the network preferences currently applied in the SIM card.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
Boolean includeOtaUpdates = false; // Boolean | It includes the associated OTA update objects in the response when present.
try {
GetSimCardNetworkPreferences200Response result = apiInstance.getSimCardNetworkPreferences(simCardId, includeOtaUpdates);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCardNetworkPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. | |
includeOtaUpdates | Boolean | It includes the associated OTA update objects in the response when present. | [optional] [default to false] |
GetSimCardNetworkPreferences200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful network preferences definition response. | - |
0 | Unexpected error | - |
GetSimCardPublicIp200Response getSimCardPublicIp(simCardId)
Get SIM card public IP definition
It returns the public IP requested for a SIM card.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
try {
GetSimCardPublicIp200Response result = apiInstance.getSimCardPublicIp(simCardId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCardPublicIp");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetSimCards200Response getSimCards(pageNumber, pageSize, includeSimCardGroup, filterSimCardGroupId, filterTags, filterIccid, filterStatus, sort)
Get all SIM cards
Get all SIM cards belonging to the user that match the given filters.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
Boolean includeSimCardGroup = false; // Boolean | It includes the associated SIM card group object in the response when present.
UUID filterSimCardGroupId = UUID.fromString("47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"); // UUID | A valid SIM card group ID.
List<String> filterTags = Arrays.asList(); // List<String> | A list of SIM card tags to filter on.<br/><br/> If the SIM card contains <b><i>all</i></b> of the given <code>tags</code> they will be found.<br/><br/> For example, if the SIM cards have the following tags: <ul> <li><code>['customers', 'staff', 'test']</code> <li><code>['test']</code></li> <li><code>['customers']</code></li> </ul> Searching for <code>['customers', 'test']</code> returns only the first because it's the only one with both tags.<br/> Searching for <code>test</code> returns the first two SIMs, because both of them have such tag.<br/> Searching for <code>customers</code> returns the first and last SIMs.<br/>
String filterIccid = "89310410106543789301"; // String | A search string to partially match for the SIM card's ICCID.
List<String> filterStatus = Arrays.asList(); // List<String> | Filter by a SIM card's status.
String sort = "current_billing_period_consumed_data.amount"; // String | Sorts SIM cards by the given field. Defaults to ascending order unless field is prefixed with a minus sign.
try {
GetSimCards200Response result = apiInstance.getSimCards(pageNumber, pageSize, includeSimCardGroup, filterSimCardGroupId, filterTags, filterIccid, filterStatus, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getSimCards");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
pageNumber | Integer | The page number to load | [optional] [default to 1] |
pageSize | Integer | The size of the page | [optional] [default to 20] |
includeSimCardGroup | Boolean | It includes the associated SIM card group object in the response when present. | [optional] [default to false] |
filterSimCardGroupId | UUID | A valid SIM card group ID. | [optional] |
filterTags | List<String> | A list of SIM card tags to filter on.<br/><br/> If the SIM card contains <b><i>all</i></b> of the given <code>tags</code> they will be found.<br/><br/> For example, if the SIM cards have the following tags: <ul> <li><code>['customers', 'staff', 'test']</code> <li><code>['test']</code></li> <li><code>['customers']</code></li> </ul> Searching for <code>['customers', 'test']</code> returns only the first because it's the only one with both tags.<br/> Searching for <code>test</code> returns the first two SIMs, because both of them have such tag.<br/> Searching for <code>customers</code> returns the first and last SIMs.<br/> | [optional] |
filterIccid | String | A search string to partially match for the SIM card's ICCID. | [optional] |
filterStatus | List<String> | Filter by a SIM card's status. | [optional] [enum: enabled, disabled, standby, data_limit_exceeded, unauthorized_imei] |
sort | String | Sorts SIM cards by the given field. Defaults to ascending order unless field is prefixed with a minus sign. | [optional] [enum: current_billing_period_consumed_data.amount] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetWirelessConnectivityLogs200Response getWirelessConnectivityLogs(simCardId, pageNumber, pageSize)
List wireless connectivity logs
This API allows listing a paginated collection of Wireless Connectivity Logs associated with a SIM Card, for troubleshooting purposes.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
try {
GetWirelessConnectivityLogs200Response result = apiInstance.getWirelessConnectivityLogs(simCardId, pageNumber, pageSize);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#getWirelessConnectivityLogs");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. | |
pageNumber | Integer | The page number to load | [optional] [default to 1] |
pageSize | Integer | The size of the page | [optional] [default to 20] |
GetWirelessConnectivityLogs200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
ListDataUsageNotifications200Response listDataUsageNotifications(pageNumber, pageSize, filterSimCardId)
List SIM card data usage notifications
Lists a paginated collection of SIM card data usage notifications. It enables exploring the collection using specific filters.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
UUID filterSimCardId = UUID.fromString("47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"); // UUID | A valid SIM card ID.
try {
ListDataUsageNotifications200Response result = apiInstance.listDataUsageNotifications(pageNumber, pageSize, filterSimCardId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#listDataUsageNotifications");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
pageNumber | Integer | The page number to load | [optional] [default to 1] |
pageSize | Integer | The size of the page | [optional] [default to 20] |
filterSimCardId | UUID | A valid SIM card ID. | [optional] |
ListDataUsageNotifications200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
PostSimCardDataUsageNotification201Response patchSimCardDataUsageNotification(id, simCardDataUsageNotification)
Updates information for a SIM Card Data Usage Notification
Updates information for a SIM Card Data Usage Notification.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
SimCardDataUsageNotification simCardDataUsageNotification = new SimCardDataUsageNotification(); // SimCardDataUsageNotification |
try {
PostSimCardDataUsageNotification201Response result = apiInstance.patchSimCardDataUsageNotification(id, simCardDataUsageNotification);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#patchSimCardDataUsageNotification");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
simCardDataUsageNotification | SimCardDataUsageNotification |
PostSimCardDataUsageNotification201Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
PostSimCardDataUsageNotification201Response postSimCardDataUsageNotification(postSimCardDataUsageNotificationRequest)
Create a new SIM card data usage notification
Creates a new SIM card data usage notification.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
PostSimCardDataUsageNotificationRequest postSimCardDataUsageNotificationRequest = new PostSimCardDataUsageNotificationRequest(); // PostSimCardDataUsageNotificationRequest |
try {
PostSimCardDataUsageNotification201Response result = apiInstance.postSimCardDataUsageNotification(postSimCardDataUsageNotificationRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#postSimCardDataUsageNotification");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
postSimCardDataUsageNotificationRequest | PostSimCardDataUsageNotificationRequest |
PostSimCardDataUsageNotification201Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Successful response | - |
0 | Unexpected error | - |
PurchaseESim202Response purchaseESim(esimPurchase)
Purchase eSIMs
Purchases and registers the specified amount of eSIMs to the current user's account.
If sim_card_group_id
is provided, the eSIMs will be associated with that group. Otherwise, the default group for the current user will be used.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
ESimPurchase esimPurchase = new ESimPurchase(); // ESimPurchase |
try {
PurchaseESim202Response result = apiInstance.purchaseESim(esimPurchase);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#purchaseESim");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
esimPurchase | ESimPurchase |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful response | - |
GetSimCardNetworkPreferences200Response putSimCardNetworkPreferences(simCardId, putSimCardNetworkPreferencesRequest)
Set network preferences
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID simCardId = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies a SIM card.
PutSimCardNetworkPreferencesRequest putSimCardNetworkPreferencesRequest = new PutSimCardNetworkPreferencesRequest(); // PutSimCardNetworkPreferencesRequest |
try {
GetSimCardNetworkPreferences200Response result = apiInstance.putSimCardNetworkPreferences(simCardId, putSimCardNetworkPreferencesRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#putSimCardNetworkPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
simCardId | UUID | Identifies a SIM card. | |
putSimCardNetworkPreferencesRequest | PutSimCardNetworkPreferencesRequest | [optional] |
GetSimCardNetworkPreferences200Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | A successful network preferences definition response. <br/><br/> The sent mobile_network_operators_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 first request for this API will return an empty mobile_network_operators_preferences with an in-progress OTA update resource in the ota_updates node containing the exact sent parameters to indicate the operation progress. The value will be applied to the principal object when the OTA update finishes its processing, thus indicating the SIM card network preference current state. * The subsequent requests will contain the current state, that is what's applied to the SIM card settings, and return the related OTA update in the ota_updates node. The returned OTA updated (present in the ota_updates node) will, by default, be the resource related to the operation, not all of them. | - |
0 | Unexpected error | - |
PurchaseESim202Response registerSimCards(siMCardRegistration)
Register SIM cards
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.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
SIMCardRegistration siMCardRegistration = new SIMCardRegistration(); // SIMCardRegistration |
try {
PurchaseESim202Response result = apiInstance.registerSimCards(siMCardRegistration);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#registerSimCards");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
siMCardRegistration | SIMCardRegistration |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful response | - |
GetSimCardAction200Response removeSimCardPublicIp(id)
Request removing a SIM card public IP
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.removeSimCardPublicIp(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#removeSimCardPublicIp");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
0 | Unexpected error | - |
GetSimCardAction200Response setNetworkPreference(id)
Create or update network preferences for a SIM card
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.setNetworkPreference(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#setNetworkPreference");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
0 | Unexpected error | - |
SetNetworkPreferencesBulk202Response setNetworkPreferencesBulk(setNetworkPreferencesBulkRequest)
Request bulk setting of network preferences for SIM cards.
This API triggers an asynchronous operation to set network preferences 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.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
SetNetworkPreferencesBulkRequest setNetworkPreferencesBulkRequest = new SetNetworkPreferencesBulkRequest(); // SetNetworkPreferencesBulkRequest |
try {
SetNetworkPreferencesBulk202Response result = apiInstance.setNetworkPreferencesBulk(setNetworkPreferencesBulkRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#setNetworkPreferencesBulk");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
setNetworkPreferencesBulkRequest | SetNetworkPreferencesBulkRequest | [optional] |
SetNetworkPreferencesBulk202Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
SetNetworkPreferencesBulk202Response setPublicIPsBulk(setNetworkPreferencesBulkRequest)
Request bulk setting SIM card public IPs.
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.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
SetNetworkPreferencesBulkRequest setNetworkPreferencesBulkRequest = new SetNetworkPreferencesBulkRequest(); // SetNetworkPreferencesBulkRequest |
try {
SetNetworkPreferencesBulk202Response result = apiInstance.setPublicIPsBulk(setNetworkPreferencesBulkRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#setPublicIPsBulk");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
setNetworkPreferencesBulkRequest | SetNetworkPreferencesBulkRequest | [optional] |
SetNetworkPreferencesBulk202Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
GetSimCardAction200Response setSimCardPublicIp(id)
Request setting a SIM card public IP
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.setSimCardPublicIp(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#setSimCardPublicIp");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
0 | Unexpected error | - |
GetSimCardAction200Response setSimCardStandby(id)
Request setting a SIM card to standby
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.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetSimCardAction200Response result = apiInstance.setSimCardStandby(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#setSimCardStandby");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Successful Response | - |
0 | Unexpected error | - |
GetSimCard200Response updateSimCard(id, siMCard)
Update a SIM card
Updates SIM card data
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
SIMCard siMCard = new SIMCard(); // SIMCard |
try {
GetSimCard200Response result = apiInstance.updateSimCard(id, siMCard);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#updateSimCard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
siMCard | SIMCard |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
SIMCardRegistrationCodeValidations validateRegistrationCodes(validateRegistrationCodesRequest)
Validate SIM cards registration codes
It validates whether SIM card registration codes are valid or not.
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.SimCardsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
SimCardsApi apiInstance = new SimCardsApi(defaultClient);
ValidateRegistrationCodesRequest validateRegistrationCodesRequest = new ValidateRegistrationCodesRequest(); // ValidateRegistrationCodesRequest |
try {
SIMCardRegistrationCodeValidations result = apiInstance.validateRegistrationCodes(validateRegistrationCodesRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SimCardsApi#validateRegistrationCodes");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
validateRegistrationCodesRequest | ValidateRegistrationCodesRequest |
SIMCardRegistrationCodeValidations
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful | - |
0 | Unexpected error | - |