List spend limits
Returns one entry per product and period you can set a limit on, with the limit, the spend so far in the period and whether the product is blocked. An entry without a limit is still listed (limit: null). When the spend cannot be read, the entry is returned with spend_usd: null and spend_error set. The list is not paginated.
GET
/
spend_limits
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.spendLimits.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.spend_limits.list()
print(page.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"),
)
spendLimits, err := client.SpendLimits.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", spendLimits.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.spendLimits().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.spend_limits.list
puts(page)<?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 {
$page = $client->spendLimits->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx spend-limits list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/spend_limits \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "daily",
"period_start": "2026-09-24",
"period_end": "2026-09-25",
"limit": {
"amount": "100",
"unlimited": false,
"origin": "self_service",
"updated_at": "2026-09-24T09:12:03.412Z"
},
"effective_limit_usd": "100",
"spend_usd": "37.41",
"spend_error": null,
"blocked": false,
"block": null
},
{
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "monthly",
"period_start": "2026-09-01",
"period_end": "2026-10-01",
"limit": null,
"effective_limit_usd": null,
"spend_usd": "812.03",
"spend_error": null,
"blocked": false,
"block": null
}
],
"meta": {
"total_pages": 1,
"total_results": 2,
"page_number": 1,
"page_size": 2
}
}Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.spendLimits.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.spend_limits.list()
print(page.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"),
)
spendLimits, err := client.SpendLimits.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", spendLimits.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.spendLimits().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.spend_limits.list
puts(page)<?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 {
$page = $client->spendLimits->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx spend-limits list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/spend_limits \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "daily",
"period_start": "2026-09-24",
"period_end": "2026-09-25",
"limit": {
"amount": "100",
"unlimited": false,
"origin": "self_service",
"updated_at": "2026-09-24T09:12:03.412Z"
},
"effective_limit_usd": "100",
"spend_usd": "37.41",
"spend_error": null,
"blocked": false,
"block": null
},
{
"record_type": "spend_limit",
"product": "inference",
"product_name": "Inference",
"period": "monthly",
"period_start": "2026-09-01",
"period_end": "2026-10-01",
"limit": null,
"effective_limit_usd": null,
"spend_usd": "812.03",
"spend_error": null,
"blocked": false,
"block": null
}
],
"meta": {
"total_pages": 1,
"total_results": 2,
"page_number": 1,
"page_size": 2
}
}