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 resource.

Responses

202: Successful Response

Schema

    data

    object

    This object represents a SIM card action. It allows tracking the current status of an operation that impacts the SIM card.

    id uuid

    Identifies the resource.

    record_type string
    sim_card_id uuid

    The related SIM card identifier.

    action_type string

    Possible values: [enable, enable_standby_sim_card, disable, set_standby]

    The operation type. It can be one of the following:

    • enable - move the SIM card to the enabled status
    • enable_standby_sim_card - move a SIM card previously on the standby status to the enabled status after it consumes data.
    • disable - move the SIM card to the disabled status
    • set_standby - move the SIM card to the standby status

    status

    object

    value string

    Possible values: [in-progress, completed, failed, interrupted]

    The current status of the SIM card action.

    reason string

    It describes why the SIM card action is in the current status. This will be null for self-explanatory statuses, such as in-progress and completed but will include further information on statuses like interrupted and failed.

    settings objectnullable

    A JSON object representation of the action params.

    created_at CreatedAt

    ISO 8601 formatted date-time indicating when the resource was created.

    updated_at UpdatedAt

    ISO 8601 formatted date-time indicating when the resource was updated.

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

Schema

    errors

    Error[]

  • Array [

  • code intrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta object
  • ]

default: Unexpected error

Schema

    errors

    Error[]

  • Array [

  • code intrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta object
  • ]

Loading...