Get Unused User Bundles
Returns all user bundles that aren’t in use.
GET
/
bundle_pricing
/
user_bundles
/
unused
JavaScript
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.bundlePricing.userBundles.listUnused();
console.log(response.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
)
response = client.bundle_pricing.user_bundles.list_unused()
print(response.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"),
)
response, err := client.BundlePricing.UserBundles.ListUnused(context.TODO(), telnyx.BundlePricingUserBundleListUnusedParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListUnusedParams;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListUnusedResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserBundleListUnusedResponse response = client.bundlePricing().userBundles().listUnused();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.bundle_pricing.user_bundles.list_unused
puts(response)<?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->bundlePricing->userBundles->listUnused(
filter: ['countryISO' => ['US'], 'resource' => ['+15617819942']],
authorizationBearer: 'authorization_bearer',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:user-bundles list-unused \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/user_bundles/unused \
--header 'Authorization: Bearer <token>'{
"data": [
{
"billing_bundle": {
"id": "7ecd040e-6bac-4139-9160-3c0427d98fea",
"name": "Australia Basic",
"cost_code": "BUNDLE-PRICING-BASIC-MRC",
"is_public": true,
"created_at": "2023-12-25",
"slug": "basic-au-e4f8",
"mrc_price": 2,
"currency": "USD",
"specs": [
"1 AU Number",
"Emergency Calling",
"All inbound and outbound calling billed pay-as-you-go"
]
},
"user_bundle_ids": [
"1e650b96-4c6a-4d6f-b8ed-87c3fcacf595",
"53beb701-1231-4548-8abf-c802f38b14aa"
]
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Format: Bearer Authenticates the request with your Telnyx API V2 KEY
Query Parameters
Consolidated filter parameter (deepObject style). Supports filtering by country_iso and resource. Examples: filter[country_iso]=US or filter[resource]=+15617819942
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
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.bundlePricing.userBundles.listUnused();
console.log(response.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
)
response = client.bundle_pricing.user_bundles.list_unused()
print(response.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"),
)
response, err := client.BundlePricing.UserBundles.ListUnused(context.TODO(), telnyx.BundlePricingUserBundleListUnusedParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListUnusedParams;
import com.telnyx.sdk.models.bundlepricing.userbundles.UserBundleListUnusedResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserBundleListUnusedResponse response = client.bundlePricing().userBundles().listUnused();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.bundle_pricing.user_bundles.list_unused
puts(response)<?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->bundlePricing->userBundles->listUnused(
filter: ['countryISO' => ['US'], 'resource' => ['+15617819942']],
authorizationBearer: 'authorization_bearer',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx bundle-pricing:user-bundles list-unused \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/bundle_pricing/user_bundles/unused \
--header 'Authorization: Bearer <token>'{
"data": [
{
"billing_bundle": {
"id": "7ecd040e-6bac-4139-9160-3c0427d98fea",
"name": "Australia Basic",
"cost_code": "BUNDLE-PRICING-BASIC-MRC",
"is_public": true,
"created_at": "2023-12-25",
"slug": "basic-au-e4f8",
"mrc_price": 2,
"currency": "USD",
"specs": [
"1 AU Number",
"Emergency Calling",
"All inbound and outbound calling billed pay-as-you-go"
]
},
"user_bundle_ids": [
"1e650b96-4c6a-4d6f-b8ed-87c3fcacf595",
"53beb701-1231-4548-8abf-c802f38b14aa"
]
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}