Skip to main content
PATCH
/
sim_card_data_usage_notifications
/
{id}
JavaScript
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.update(
  '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
);

console.log(simCardDataUsageNotification.data);
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.update(
sim_card_data_usage_notification_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
)
print(sim_card_data_usage_notification.data)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
simCardDataUsageNotification, err := client.SimCardDataUsageNotifications.Update(
context.TODO(),
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
telnyx.SimCardDataUsageNotificationUpdateParams{
SimCardDataUsageNotification: telnyx.SimCardDataUsageNotificationParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", simCardDataUsageNotification.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.simcarddatausagenotifications.SimCardDataUsageNotification;
import com.telnyx.sdk.models.simcarddatausagenotifications.SimCardDataUsageNotificationUpdateParams;
import com.telnyx.sdk.models.simcarddatausagenotifications.SimCardDataUsageNotificationUpdateResponse;

public final class Main {
private Main() {}

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

SimCardDataUsageNotificationUpdateParams params = SimCardDataUsageNotificationUpdateParams.builder()
.simCardDataUsageNotificationId("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
.simCardDataUsageNotification(SimCardDataUsageNotification.builder().build())
.build();
SimCardDataUsageNotificationUpdateResponse simCardDataUsageNotification = client.simCardDataUsageNotifications().update(params);
}
}
require "telnyx"

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

sim_card_data_usage_notification = telnyx.sim_card_data_usage_notifications.update("6a09cdc3-8948-47f0-aa62-74ac943d6c58")

puts(sim_card_data_usage_notification)
<?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
->update(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
simCardID: 'b34c1683-cd85-4493-b9a5-315eb4bc5e19',
threshold: ['amount' => '2048.0', 'unit' => 'MB'],
);

var_dump($simCardDataUsageNotification);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx sim-card-data-usage-notifications update \
--api-key 'My API Key' \
--sim-card-data-usage-notification-id 6a09cdc3-8948-47f0-aa62-74ac943d6c58
curl --request PATCH \
--url https://api.telnyx.com/v2/sim_card_data_usage_notifications/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
'
{
  "data": {
    "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"
  }
}
{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Identifies the resource.

Example:

"6a09cdc3-8948-47f0-aa62-74ac943d6c58"

Body

application/json

The SIM card individual data usage notification information.

sim_card_id
string<uuid>

The identification UUID of the related SIM card resource.

Example:

"b34c1683-cd85-4493-b9a5-315eb4bc5e19"

threshold
object

Data usage threshold that will trigger the notification.

Response

Successful Response

data
object

The SIM card individual data usage notification information.

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"
}