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

# Request a SIM card disable

> This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.<br/>
The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the disabled state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](https://developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.




## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-provisioning.yml post /sim_cards/{id}/actions/disable
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:
  /sim_cards/{id}/actions/disable:
    post:
      tags:
        - SIM Cards
      summary: Request a SIM card disable
      description: >
        This API disables a SIM card, disconnecting it from the network and
        making it impossible to consume data.<br/>

        The API will trigger an asynchronous operation called a SIM Card Action.
        Transitioning to the disabled state may take a period of time. The
        status of the SIM Card Action can be followed through the [List SIM Card
        Action](https://developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions)
        API.
      operationId: DisableSimCard
      parameters:
        - $ref: '#/components/parameters/SIMCardId'
      responses:
        '202':
          $ref: '#/components/responses/SIMCardActionResponse'
        '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.disable('6a09cdc3-8948-47f0-aa62-74ac943d6c58');


            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.disable(
                "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
            )
            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.Disable(context.TODO(), \"6a09cdc3-8948-47f0-aa62-74ac943d6c58\")\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.ActionDisableParams;
            import com.telnyx.sdk.models.simcards.actions.ActionDisableResponse;

            public final class Main {
                private Main() {}

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

                    ActionDisableResponse response = client.simCards().actions().disable("6a09cdc3-8948-47f0-aa62-74ac943d6c58");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.sim_cards.actions.disable("6a09cdc3-8948-47f0-aa62-74ac943d6c58")


            puts(response)
        - 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 {
              $response = $client->simCards->actions->disable(
                '6a09cdc3-8948-47f0-aa62-74ac943d6c58'
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sim-cards:actions disable \
              --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
  responses:
    SIMCardActionResponse:
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/SIMCardAction'
      description: Successful Response
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    SIMCardAction:
      type: object
      title: SIMCardAction
      description: >-
        This object represents a SIM card action. It allows tracking the current
        status of an operation that impacts the SIM card.
      properties:
        id:
          $ref: '#/components/schemas/wireless_Id'
        record_type:
          type: string
          example: sim_card_action
          readOnly: true
        sim_card_id:
          type: string
          format: uuid
          description: The related SIM card identifier.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        action_type:
          type: string
          description: |-
            The operation type. It can be one of the following: <br/>
            <ul>
             <li><code>enable</code> - move the SIM card to the <code>enabled</code> status</li>
             <li><code>enable_standby_sim_card</code> - move a SIM card previously on the <code>standby</code> status to the <code>enabled</code> status after it consumes data.</li>
             <li><code>disable</code> - move the SIM card to the <code>disabled</code> status</li>
             <li><code>set_standby</code> - move the SIM card to the <code>standby</code> status</li>
             </ul>
          enum:
            - enable
            - enable_standby_sim_card
            - disable
            - set_standby
          readOnly: true
          example: enable
        status:
          type: object
          properties:
            value:
              type: string
              description: The current status of the SIM card action.
              enum:
                - in-progress
                - completed
                - failed
                - interrupted
              readOnly: true
              example: completed
            reason:
              type: string
              description: >-
                It describes why the SIM card action is in the current status.
                This will be <code>null</code> for self-explanatory statuses,
                such as <code>in-progress</code> and <code>completed</code> but
                will include further information on statuses like
                <code>interrupted</code> and <code>failed</code>.
              readOnly: true
              example: The data limit was exceeded.
        settings:
          type:
            - object
            - 'null'
          description: A JSON object representation of the action params.
          example: {}
          readOnly: true
          additionalProperties: true
        created_at:
          $ref: '#/components/schemas/wireless_CreatedAt'
        updated_at:
          $ref: '#/components/schemas/wireless_UpdatedAt'
    wireless_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/wireless_Error'
      type: object
    wireless_Id:
      type: string
      format: uuid
      description: Identifies the resource.
      readOnly: true
      example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
    wireless_CreatedAt:
      type: string
      description: ISO 8601 formatted date-time indicating when the resource was created.
      readOnly: true
      example: '2018-02-02T22:25:27.521Z'
    wireless_UpdatedAt:
      type: string
      description: ISO 8601 formatted date-time indicating when the resource was updated.
      readOnly: true
      example: '2018-02-02T22:25:27.521Z'
    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

````