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

# Register SIM cards

> 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 that group. Otherwise, the default group for the current user will be used.<br/><br/>




## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-provisioning.yml post /actions/register/sim_cards
openapi: 3.1.0
info:
  title: SIM Cards Provisioning API
  version: 2.0.0
  description: >-
    SIM card ordering, registration, and provisioning actions including enable,
    disable, and standby.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /actions/register/sim_cards:
    post:
      tags:
        - SIM Cards
      summary: Register SIM cards
      description: >
        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 that group. Otherwise, the default group for the current
        user will be used.<br/><br/>
      operationId: RegisterSimCards
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SIMCardRegistration'
        required: true
      responses:
        '202':
          $ref: '#/components/responses/RegisterSimCardsResponse'
        '401':
          description: Unauthorized
      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 register = await client.actions.register.create({
              registration_codes: ['0000000001', '0000000002', '0000000003'],
            });

            console.log(register.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
            )
            register = client.actions.register.create(
                registration_codes=["0000000001", "0000000002", "0000000003"],
            )
            print(register.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\tregister, err := client.Actions.Register.New(context.TODO(), telnyx.ActionRegisterNewParams{\n\t\tRegistrationCodes: []string{\"0000000001\", \"0000000002\", \"0000000003\"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", register.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.actions.register.RegisterCreateParams;

            import
            com.telnyx.sdk.models.actions.register.RegisterCreateResponse;

            import java.util.List;


            public final class Main {
                private Main() {}

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

                    RegisterCreateParams params = RegisterCreateParams.builder()
                        .registrationCodes(List.of(
                          "0000000001",
                          "0000000002",
                          "0000000003"
                        ))
                        .build();
                    RegisterCreateResponse register = client.actions().register().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            register = telnyx.actions.register.create(registration_codes:
            ["0000000001", "0000000002", "0000000003"])


            puts(register)
        - 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 {
              $register = $client->actions->register->create(
                registrationCodes: ['0000000001', '0000000002', '0000000003'],
                simCardGroupID: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
                status: 'standby',
                tags: ['personal', 'customers', 'active-customers'],
              );

              var_dump($register);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx actions:register create \
              --api-key 'My API Key' \
              --registration-code "'0000000001'" \
              --registration-code "'0000000002'" \
              --registration-code "'0000000003'"
components:
  schemas:
    SIMCardRegistration:
      title: SIMCardRegistration
      type: object
      properties:
        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
        registration_codes:
          type: array
          items:
            type: string
          example:
            - '0000000001'
            - '0000000002'
            - '0000000003'
        status:
          type: string
          description: >-
            Status on which the SIM card will be set after being successful
            registered.
          enum:
            - enabled
            - disabled
            - standby
          example: standby
          default: enabled
      required:
        - registration_codes
    SimpleSIMCard:
      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
        data_limit:
          type: object
          description: The SIM card individual data limit configuration.
          readOnly: true
          properties:
            amount:
              type: string
              example: '2048.0'
            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'
        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
        authorized_imeis:
          type:
            - array
            - 'null'
          description: List of IMEIs authorized to use a given SIM card.
          items:
            type: string
          example:
            - '106516771852751'
            - '534051870479563'
            - '508821468377961'
        voice_enabled:
          type: boolean
          description: Indicates whether voice services are enabled for the SIM card.
          readOnly: true
          example: false
          default: false
    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
    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.
  responses:
    RegisterSimCardsResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                description: Successfully registered SIM cards.
                type: array
                items:
                  $ref: '#/components/schemas/SimpleSIMCard'
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/wireless_Error'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````