> ## 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 new SIM card data usage notification

> Creates a new SIM card data usage notification.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-configuration.yml post /sim_card_data_usage_notifications
openapi: 3.1.0
info:
  title: SIM Cards Configuration API
  version: 2.0.0
  description: >-
    Network configuration for SIM cards including public IP management, private
    wireless gateways, blocklists, traffic policy profiles, and data usage
    notifications.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sim_card_data_usage_notifications:
    post:
      tags:
        - SIM Cards
      summary: Create a new SIM card data usage notification
      description: Creates a new SIM card data usage notification.
      operationId: PostSimCardDataUsageNotification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sim_card_id:
                  type: string
                  format: uuid
                  description: The identification UUID of the related SIM card resource.
                  example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
                threshold:
                  type: object
                  description: Data usage threshold that will trigger the notification.
                  properties:
                    amount:
                      type: string
                      example: '2048.1'
                    unit:
                      type: string
                      example: MB
                      enum:
                        - MB
                        - GB
              required:
                - sim_card_id
                - threshold
      responses:
        '201':
          $ref: '#/components/responses/CreateSimCardDataUsageNotificationResponse'
        '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 simCardDataUsageNotification = await
            client.simCardDataUsageNotifications.create({
              sim_card_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
              threshold: {},
            });


            console.log(simCardDataUsageNotification.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_data_usage_notification =
            client.sim_card_data_usage_notifications.create(
                sim_card_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
                threshold={},
            )

            print(sim_card_data_usage_notification.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\tsimCardDataUsageNotification, err := client.SimCardDataUsageNotifications.New(context.TODO(), telnyx.SimCardDataUsageNotificationNewParams{\n\t\tSimCardID: \"6a09cdc3-8948-47f0-aa62-74ac943d6c58\",\n\t\tThreshold: telnyx.SimCardDataUsageNotificationNewParamsThreshold{},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", simCardDataUsageNotification.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.simcarddatausagenotifications.SimCardDataUsageNotificationCreateParams;

            import
            com.telnyx.sdk.models.simcarddatausagenotifications.SimCardDataUsageNotificationCreateResponse;


            public final class Main {
                private Main() {}

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

                    SimCardDataUsageNotificationCreateParams params = SimCardDataUsageNotificationCreateParams.builder()
                        .simCardId("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
                        .threshold(SimCardDataUsageNotificationCreateParams.Threshold.builder().build())
                        .build();
                    SimCardDataUsageNotificationCreateResponse simCardDataUsageNotification = client.simCardDataUsageNotifications().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            sim_card_data_usage_notification =
            telnyx.sim_card_data_usage_notifications.create(
              sim_card_id: "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
              threshold: {}
            )


            puts(sim_card_data_usage_notification)
        - 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 {
              $simCardDataUsageNotification = $client
                ->simCardDataUsageNotifications
                ->create(
                simCardID: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
                threshold: ['amount' => '2048.1', 'unit' => 'MB'],
              );

              var_dump($simCardDataUsageNotification);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sim-card-data-usage-notifications create \
              --api-key 'My API Key' \
              --sim-card-id 6a09cdc3-8948-47f0-aa62-74ac943d6c58 \
              --threshold '{}'
components:
  responses:
    CreateSimCardDataUsageNotificationResponse:
      description: Successful Response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/SimCardDataUsageNotification'
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    SimCardDataUsageNotification:
      type: object
      description: The SIM card individual data usage notification information.
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 79228acc-3f08-4e70-ac68-cb5aae8b537a
        sim_card_id:
          type: string
          format: uuid
          description: The identification UUID of the related SIM card resource.
          example: b34c1683-cd85-4493-b9a5-315eb4bc5e19
        record_type:
          type: string
          example: sim_card_data_usage_notification
          readOnly: true
        threshold:
          type: object
          description: Data usage threshold that will trigger the notification.
          properties:
            amount:
              type: string
              example: '2048.1'
            unit:
              type: string
              example: MB
              enum:
                - MB
                - GB
        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'
      example:
        id: 79228acc-3f08-4e70-ac68-cb5aae8b537a
        sim_card_id: b34c1683-cd85-4493-b9a5-315eb4bc5e19
        threshold:
          amount: '2048.0'
          unit: MB
        created_at: '2018-02-02T22:25:27.521Z'
        updated_at: '2018-02-02T22:25:27.521Z'
    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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````