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

# Create a SIM card order

> Creates a new order for SIM cards.



## OpenAPI

````yaml /openapi/source/external/wireless/wireless.json post /sim_card_orders
openapi: 3.1.0
info:
  version: 2.0.0
  title: Telnyx API
  x-latency-category: responsive
  x-endpoint-cost: light
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API.
security:
  - bearerAuth: []
tags:
  - name: Wireless
    description: Wireless operations
  - name: SIM Cards
    description: SIM Cards operations
  - name: SIM Card Actions
    description: >-
      View SIM card actions, their progress and timestamps using the SIM Card
      Actions API
  - name: SIM Card Groups
    description: SIM Card Groups operations
  - name: SIM Card Group Actions
    description: SIM Card Group actions operations
  - name: SIM Card Orders
    description: SIM Card Orders operations
  - name: Reporting
    description: Wireless reporting operations
  - name: Wireless Regions
    description: Regions for wireless services
  - name: OTA updates
    description: OTA updates operations
  - name: Mobile Network Operators
    description: Mobile network operators operations
  - name: Private Wireless Gateways
    description: Private Wireless Gateways operations
  - name: Wireless Blocklists
    description: Wireless Blocklists operations
  - name: Traffic Policy Profiles
    description: Traffic Policy Profiles operations
paths:
  /sim_card_orders:
    post:
      tags:
        - SIM Card Orders
      summary: Create a SIM card order
      description: Creates a new order for SIM cards.
      operationId: CreateSimCardOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimCardOrderCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SIMCardOrder'
          description: Successful Response
        '401':
          description: Unauthorized
        default:
          $ref: '#/components/responses/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 simCardOrder = await client.simCardOrders.create({
              address_id: '1293384261075731499',
              quantity: 23,
            });

            console.log(simCardOrder.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_order = client.sim_card_orders.create(
                address_id="1293384261075731499",
                quantity=23,
            )
            print(sim_card_order.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\tsimCardOrder, err := client.SimCardOrders.New(context.TODO(), telnyx.SimCardOrderNewParams{\n\t\tAddressID: \"1293384261075731499\",\n\t\tQuantity:  23,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", simCardOrder.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.simcardorders.SimCardOrderCreateParams;

            import
            com.telnyx.sdk.models.simcardorders.SimCardOrderCreateResponse;


            public final class Main {
                private Main() {}

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

                    SimCardOrderCreateParams params = SimCardOrderCreateParams.builder()
                        .addressId("1293384261075731499")
                        .quantity(23L)
                        .build();
                    SimCardOrderCreateResponse simCardOrder = client.simCardOrders().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            sim_card_order = telnyx.sim_card_orders.create(address_id:
            "1293384261075731499", quantity: 23)


            puts(sim_card_order)
        - 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 {
              $simCardOrder = $client->simCardOrders->create(
                addressID: '1293384261075731499', quantity: 23
              );

              var_dump($simCardOrder);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sim-card-orders create \
              --api-key 'My API Key' \
              --address-id 1293384261075731499 \
              --quantity 23
components:
  schemas:
    SimCardOrderCreate:
      title: SimCardOrderCreate
      type: object
      properties:
        address_id:
          type: string
          description: Uniquely identifies the address for the order.
          example: '1293384261075731499'
        quantity:
          description: The amount of SIM cards to order.
          type: integer
          minimum: 1
          example: 23
      required:
        - address_id
        - quantity
    SIMCardOrder:
      title: SIMCardOrder
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: sim_card_order
        quantity:
          type: integer
          minimum: 1
          description: The amount of SIM cards requested in the SIM card order.
          example: 21
        cost:
          type: object
          description: An object representing the total cost of the order.
          properties:
            amount:
              type: string
              description: A string representing the cost amount.
              example: '2.32'
            currency:
              type: string
              description: Filter by ISO 4217 currency string.
              example: USD
          example:
            amount: '2.52'
            currency: USD
        order_address:
          type: object
          properties:
            id:
              type: string
              description: Uniquely identifies the address for the order.
              example: '1293384261075731499'
            first_name:
              type: string
              description: The first name of the shipping recipient.
              example: John
            last_name:
              type: string
              description: The last name of the shipping recipient.
              example: Smith
            business_name:
              type: string
              description: The name of the business where the address is located.
              example: Telnyx LLC
            street_address:
              type: string
              description: The name of the street where the address is located.
              example: 600 Congress Avenue
            extended_address:
              type: string
              description: Supplemental field for address information.
              example: 14th Floor
            locality:
              type: string
              description: The name of the city where the address is located.
              example: Austin
            administrative_area:
              type: string
              description: State or province where the address is located.
              example: TX
            country_code:
              type: string
              description: >-
                The mobile operator two-character (ISO 3166-1 alpha-2) origin
                country code.
              example: US
            postal_code:
              type: string
              description: Postal code for the address.
              example: '78701'
          description: >-
            An object representing the address information from when the order
            was submitted.
          readOnly: true
          example:
            id: '1293384261075731499'
            street_address: 600 Congress Avenue
            extended_address: 14th Floor
            locality: Austin
            administrative_area: TX
            country_code: US
            postal_code: '78701'
        tracking_url:
          type: string
          format: uri
          description: The URL used to get tracking information about the order.
          example: http://www.example.com/
        status:
          type: string
          description: >-
            The current status of the SIM Card order.<ul>
            <li><code>pending</code> - the order is waiting to be
            processed.</li> <li><code>processing</code> - the order is currently
            being processed.</li> <li><code>ready_to_ship</code> - the order is
            ready to be shipped to the specified <b>address</b>.</li>
            <li><code>shipped</code> - the order was shipped and is on its way
            to be delivered to the specified <b>address</b>.</li>
            <li><code>delivered</code> - the order was delivered to the
            specified <b>address</b>.</li> <li><code>canceled</code> - the order
            was canceled.</li> </ul>
          enum:
            - pending
            - processing
            - ready_to_ship
            - shipped
            - delivered
            - canceled
          example: pending
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was last
            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 last
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
    Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      type: object
    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:
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          examples:
            unexpectedError:
              summary: Unexpected API error
              value:
                errors:
                  - code: '10007'
                    title: Unexpected error
                    detail: An unexpected error occured.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````