Update a spend limit
Replaces the value of the existing limit for the product and period. Send exactly one of amount and unlimited: true. The period’s spend is checked at once: raising the limit above the spend lifts the period’s block (evaluation.released), and lowering it below the spend blocks the product (evaluation.blocked_now). Returns 404 when no limit is set; create it instead.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const SpendLimit = await client.spendLimits.update('product');
console.log(SpendLimit.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
)
spend_limit = client.spend_limits.update(
product="product",
)
print(spend_limit.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"),
)
spendLimit, err := client.SpendLimits.Update(
context.TODO(),
"product",
telnyx.SpendLimitUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", spendLimit.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.spendLimits.SpendLimitUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SpendLimitUpdateParams params = SpendLimitUpdateParams.builder()
.build();
var response = client.spendLimits().update("product", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
spend_limit = telnyx.spend_limits.update("product")
puts(spend_limit)<?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 {
$spend_limit = $client->spendLimits->update(
'product',
);
var_dump($spend_limit);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx spend-limits update \
--api-key 'My API Key' \
--product inferencecurl --request PATCH \
--url https://api.telnyx.com/v2/spend_limits/{product} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 250
}'{
"data": {
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "daily",
"period_start": "2026-09-24",
"period_end": "2026-09-25",
"limit": {
"amount": "250",
"unlimited": false,
"origin": "self_service",
"updated_at": "2026-09-24T09:12:03.412Z"
},
"effective_limit_usd": "250",
"spend_usd": "37.41",
"spend_error": null,
"blocked": false,
"block": null,
"evaluation": {
"spend_usd": "112.50",
"released": true,
"blocked_now": false,
"still_over_limit": false,
"still_blocked_other_period": false,
"evaluation_deferred": false
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Product the limit applies to, as returned in product by the list operation.
"inference"
Query Parameters
Limit period. Defaults to daily; send it explicitly.
daily is the current UTC day; monthly is the current UTC calendar month.
daily, monthly "daily"
Body
- Amount
- Unlimited
Send exactly one of amount and unlimited: true.
Limit in USD. 0 blocks at the first cent of spend.
x >= 0100
Optional; only false is allowed together with amount.
false false
Why the limit is set or changed, kept for audit.
500"Raised for the product launch"
Response
The limit was updated. evaluation says whether the change lifted or started a block.
The spend limit, spend and block state of one product and period.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const SpendLimit = await client.spendLimits.update('product');
console.log(SpendLimit.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
)
spend_limit = client.spend_limits.update(
product="product",
)
print(spend_limit.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"),
)
spendLimit, err := client.SpendLimits.Update(
context.TODO(),
"product",
telnyx.SpendLimitUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", spendLimit.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.spendLimits.SpendLimitUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SpendLimitUpdateParams params = SpendLimitUpdateParams.builder()
.build();
var response = client.spendLimits().update("product", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
spend_limit = telnyx.spend_limits.update("product")
puts(spend_limit)<?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 {
$spend_limit = $client->spendLimits->update(
'product',
);
var_dump($spend_limit);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx spend-limits update \
--api-key 'My API Key' \
--product inferencecurl --request PATCH \
--url https://api.telnyx.com/v2/spend_limits/{product} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 250
}'{
"data": {
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "daily",
"period_start": "2026-09-24",
"period_end": "2026-09-25",
"limit": {
"amount": "250",
"unlimited": false,
"origin": "self_service",
"updated_at": "2026-09-24T09:12:03.412Z"
},
"effective_limit_usd": "250",
"spend_usd": "37.41",
"spend_error": null,
"blocked": false,
"block": null,
"evaluation": {
"spend_usd": "112.50",
"released": true,
"blocked_now": false,
"still_over_limit": false,
"still_blocked_other_period": false,
"evaluation_deferred": false
}
}
}