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

# Validate SIM cards registration codes

> It validates whether SIM card registration codes are valid or not.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-bulk-actions.yml post /sim_cards/actions/validate_registration_codes
openapi: 3.1.0
info:
  title: SIM Cards Bulk Actions API
  version: 2.0.0
  description: >-
    Bulk SIM card operations including bulk enable/disable voice, bulk set
    public IPs, and registration code validation.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sim_cards/actions/validate_registration_codes:
    post:
      tags:
        - SIM Cards
      summary: Validate SIM cards registration codes
      description: It validates whether SIM card registration codes are valid or not.
      operationId: ValidateRegistrationCodes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                registration_codes:
                  type: array
                  items:
                    type: string
              description: The object containing the Array of SIM card registration codes.
              example:
                registration_codes:
                  - '123456780'
                  - '1231231230'
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SIMCardRegistrationCodeValidations'
        '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 response = await
            client.simCards.actions.validateRegistrationCodes();


            console.log(response.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
            )
            response = client.sim_cards.actions.validate_registration_codes()
            print(response.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\tresponse, err := client.SimCards.Actions.ValidateRegistrationCodes(context.TODO(), telnyx.SimCardActionValidateRegistrationCodesParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.actions.ActionValidateRegistrationCodesParams;

            import
            com.telnyx.sdk.models.simcards.actions.ActionValidateRegistrationCodesResponse;


            public final class Main {
                private Main() {}

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

                    ActionValidateRegistrationCodesResponse response = client.simCards().actions().validateRegistrationCodes();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.sim_cards.actions.validate_registration_codes

            puts(response)
        - lang: CLI
          source: |-
            telnyx sim-cards:actions validate-registration-codes \
              --api-key 'My API Key'
components:
  schemas:
    SIMCardRegistrationCodeValidations:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SIMCardRegistrationCodeValidation'
    SIMCardRegistrationCodeValidation:
      type: object
      properties:
        record_type:
          type: string
          example: sim_card_registration_code_validation
        registration_code:
          type: string
          description: The 10-digit SIM card registration code
          example: '0123456789'
        valid:
          type: boolean
          description: The attribute that denotes whether the code is valid or not
          example: false
        invalid_detail:
          type:
            - string
            - 'null'
          description: The validation message
          example: This code has already been used.
    wireless_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/wireless_Error'
      type: object
    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
  responses:
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````