> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get SIM card

> Returns the details regarding a specific SIM card.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards.yml get /sim_cards/{id}
openapi: 3.1.0
info:
  title: SIM Cards API
  version: 2.0.0
  description: >-
    Basic SIM card management including listing, creating, retrieving, updating,
    and deleting SIM cards.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sim_cards/{id}:
    get:
      tags:
        - SIM Cards
      summary: Get SIM card
      description: Returns the details regarding a specific SIM card.
      operationId: GetSimCard
      parameters:
        - $ref: '#/components/parameters/SIMCardId'
        - $ref: '#/components/parameters/IncludeSIMCardGroup'
        - name: include_pin_puk_codes
          in: query
          description: >-
            When set to true, includes the PIN and PUK codes in the response.
            These codes are used for SIM card security and unlocking purposes.
            Available for both physical SIM cards and eSIMs.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/GetSimCardResponse'
        '401':
          description: Unauthorized
        default:
          $ref: '#/components/responses/wireless_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const simCard = await
            client.simCards.retrieve('6a09cdc3-8948-47f0-aa62-74ac943d6c58');


            console.log(simCard.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            sim_card = client.sim_cards.retrieve(
                id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
            )
            print(sim_card.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tsimCard, err := client.SimCards.Get(\n\t\tcontext.TODO(),\n\t\t\"6a09cdc3-8948-47f0-aa62-74ac943d6c58\",\n\t\ttelnyx.SimCardGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", simCard.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.simcards.SimCardRetrieveParams;
            import com.telnyx.sdk.models.simcards.SimCardRetrieveResponse;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    SimCardRetrieveResponse simCard = client.simCards().retrieve("6a09cdc3-8948-47f0-aa62-74ac943d6c58");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            sim_card =
            telnyx.sim_cards.retrieve("6a09cdc3-8948-47f0-aa62-74ac943d6c58")


            puts(sim_card)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $simCard = $client->simCards->retrieve(
                '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
                includePinPukCodes: true,
                includeSimCardGroup: true,
              );

              var_dump($simCard);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sim-cards retrieve \
              --api-key 'My API Key' \
              --id 6a09cdc3-8948-47f0-aa62-74ac943d6c58
components:
  parameters:
    SIMCardId:
      name: id
      description: Identifies the SIM.
      in: path
      required: true
      schema:
        format: uuid
        type: string
        example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
    IncludeSIMCardGroup:
      name: include_sim_card_group
      in: query
      description: >-
        It includes the associated SIM card group object in the response when
        present.
      schema:
        type: boolean
        default: false
        example: true
  responses:
    GetSimCardResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/SIMCard'
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    SIMCard:
      type: object
      title: SIMCard
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          example: sim_card
          readOnly: true
        status:
          $ref: '#/components/schemas/SIMCardStatus'
        type:
          type: string
          description: The type of SIM card
          readOnly: true
          example: physical
          enum:
            - physical
            - esim
        iccid:
          type: string
          description: >
            The ICCID is the identifier of the specific SIM card/chip. Each SIM
            is internationally identified by its integrated circuit card
            identifier (ICCID). ICCIDs are stored in the SIM card's memory and
            are also engraved or printed on the SIM card body during a process
            called personalization.
          readOnly: true
          example: '89310410106543789301'
        imsi:
          type: string
          description: >
            SIM cards are identified on their individual network operators by a
            unique International Mobile Subscriber Identity (IMSI). <br/>

            Mobile network operators connect mobile phone calls and communicate
            with their market SIM cards using their IMSIs. The IMSI is stored in
            the Subscriber  Identity Module (SIM) inside the device and is sent
            by the device to the appropriate network. It is used to acquire the
            details of the device in the Home  Location Register (HLR) or the
            Visitor Location Register (VLR).
          readOnly: true
          example: '081932214823362973'
        msisdn:
          type: string
          description: >
            Mobile Station International Subscriber Directory Number (MSISDN) is
            a number used to identify a mobile phone number internationally.
            <br/>

            MSISDN is defined by the E.164 numbering plan. It includes a country
            code and a National Destination Code which identifies the
            subscriber's operator.
          readOnly: true
          example: '+13109976224'
        sim_card_group_id:
          type: string
          format: uuid
          description: >-
            The group SIMCardGroup identification. This attribute can be
            <code>null</code> when it's present in an associated resource.
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        tags:
          type: array
          description: Searchable tags associated with the SIM card
          items:
            type: string
          example:
            - personal
            - customers
            - active-customers
        authorized_imeis:
          type:
            - array
            - 'null'
          description: List of IMEIs authorized to use a given SIM card.
          items:
            type: string
          example:
            - '106516771852751'
            - '534051870479563'
            - '508821468377961'
        current_imei:
          type: string
          description: IMEI of the device where a given SIM card is currently being used.
          readOnly: true
          example: '457032284023794'
        data_limit:
          type: object
          description: The SIM card individual data limit configuration.
          properties:
            amount:
              type: string
              example: '2048.1'
            unit:
              type: string
              example: MB
              enum:
                - MB
                - GB
        current_billing_period_consumed_data:
          type: object
          description: The SIM card consumption so far in the current billing cycle.
          readOnly: true
          properties:
            amount:
              type: string
              example: '2049.0'
            unit:
              type: string
              example: MB
              default: MB
        actions_in_progress:
          type: boolean
          description: Indicate whether the SIM card has any pending (in-progress) actions.
          readOnly: true
          example: true
          default: false
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        ipv4:
          type: string
          description: >
            The SIM's address in the currently connected network. This IPv4
            address is usually obtained dynamically, so it may vary according to
            the location or new connections.
          readOnly: true
          example: 192.168.0.0
        ipv6:
          type: string
          description: >
            The SIM's address in the currently connected network. This IPv6
            address is usually obtained dynamically, so it may vary according to
            the location or new connections.
          readOnly: true
          example: 2001:cdba:0000:0000:0000:0000:3257:9652
        current_device_location:
          type: object
          description: >-
            Current physical location data of a given SIM card. Accuracy is
            given in meters.
          readOnly: true
          properties:
            latitude:
              type: string
              example: '41.143'
            longitude:
              type: string
              example: '-8.605'
            accuracy:
              type: integer
              example: 1250
            accuracy_unit:
              type: string
              example: m
              default: m
        current_mnc:
          type: string
          readOnly: true
          description: >-
            Mobile Network Code of the current network to which the SIM card is
            connected. It's a two to three decimal digits that identify a
            network.<br/><br/>
             This code is commonly seen joined with a Mobile Country Code (MCC) in a tuple that allows identifying a carrier known as PLMN (Public Land Mobile Network) code.
          example: '260'
        current_mcc:
          type: string
          readOnly: true
          description: >-
            Mobile Country Code of the current network to which the SIM card is
            connected. It's a three decimal digit that identifies a
            country.<br/><br/>

            This code is commonly seen joined with a Mobile Network Code (MNC)
            in a tuple that allows identifying a carrier known as PLMN (Public
            Land Mobile Network) code.
          example: '410'
        live_data_session:
          type: string
          enum:
            - connected
            - disconnected
            - unknown
          readOnly: true
          description: >-
            Indicates whether the device is actively connected to a network and
            able to run data.
          example: connected
        pin_puk_codes:
          type: object
          description: >-
            PIN and PUK codes for the SIM card. Only available when
            include_pin_puk_codes=true is set in the request.
          readOnly: true
          properties:
            pin1:
              type: string
              description: >-
                The primary Personal Identification Number (PIN) for the SIM
                card. This is a 4-digit code used to protect the SIM card from
                unauthorized use.
              example: '1234'
              readOnly: true
            pin2:
              type: string
              description: >-
                The secondary Personal Identification Number (PIN2) for the SIM
                card. This is a 4-digit code used for additional security
                features.
              example: '5678'
              readOnly: true
            puk1:
              type: string
              description: >-
                The primary Personal Unblocking Key (PUK1) for the SIM card.
                This is an 8-digit code used to unlock the SIM card if PIN1 is
                entered incorrectly multiple times.
              example: '12345678'
              readOnly: true
            puk2:
              type: string
              description: >-
                The secondary Personal Unblocking Key (PUK2) for the SIM card.
                This is an 8-digit code used to unlock the SIM card if PIN2 is
                entered incorrectly multiple times.
              example: '87654321'
              readOnly: true
        esim_installation_status:
          type:
            - string
            - 'null'
          description: The installation status of the eSIM. Only applicable for eSIM cards.
          readOnly: true
          example: released
          enum:
            - released
            - disabled
        version:
          type: string
          description: The version of the SIM card.
          readOnly: true
          example: '4.3'
        resources_with_in_progress_actions:
          type: array
          description: List of resources with actions in progress.
          readOnly: true
          items:
            type: object
          example: []
        eid:
          type:
            - string
            - 'null'
          description: The Embedded Identity Document (eID) for eSIM cards.
          readOnly: true
          example: null
        voice_enabled:
          type: boolean
          description: Indicates whether voice services are enabled for the SIM card.
          readOnly: true
          example: false
          default: false
    wireless_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/wireless_Error'
      type: object
    SIMCardStatus:
      type: object
      properties:
        value:
          type: string
          enum:
            - registering
            - enabling
            - enabled
            - disabling
            - disabled
            - data_limit_exceeded
            - setting_standby
            - standby
          description: >
            The current status of the SIM card. It will be one of the following:
            <br/>

            <ul>
             <li><code>registering</code> - the card is being registered</li>
             <li><code>enabling</code> - the card is being enabled</li>
             <li><code>enabled</code> - the card is enabled and ready for use</li>
             <li><code>disabling</code> - the card is being disabled</li>
             <li><code>disabled</code> - the card has been disabled and cannot be used</li>
             <li><code>data_limit_exceeded</code> - the card has exceeded its data consumption limit</li>
             <li><code>setting_standby</code> - the process to set the card in stand by is in progress</li>
             <li><code>standby</code> - the card is in stand by</li>
            </ul>

            Transitioning between the enabled and disabled states may take a
            period of time.
          readOnly: true
          example: enabled
        reason:
          type: string
          description: It describes why the SIM card is in the current status.
          readOnly: true
          example: >-
            The SIM card is active, ready to connect to networks and consume
            data.
    wireless_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````