Skip to main content

Create or update network preferences for a SIM card

POST 
/sim_cards/:id/actions/set_network_preferences

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.

Request

Path Parameters

    id uuidrequired

    Identifies the SIM.

Responses

202: Successful Response

422: Unprocessable entity. Check the 'detail' field in response for details.

default: Unexpected error

Request samples


curl -L -X POST 'https://api.telnyx.com/v2/sim_cards/:id/actions/set_network_preferences' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

Response samples


{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_action",
"sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"action_type": "enable",
"status": {
"value": "completed",
"reason": "The data limit was exceeded."
},
"settings": {},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}