Skip to main content
PUT
/
channel_zones
/
{channel_zone_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 channelZone = await client.channelZones.update('channel_zone_id', { channels: 0 });

console.log(channelZone.id);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
channel_zone = client.channel_zones.update(
channel_zone_id="channel_zone_id",
channels=0,
)
print(channel_zone.id)
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"),
)
channelZone, err := client.ChannelZones.Update(
context.TODO(),
"channel_zone_id",
telnyx.ChannelZoneUpdateParams{
Channels: 0,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", channelZone.ID)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.channelzones.ChannelZoneUpdateParams;
import com.telnyx.sdk.models.channelzones.ChannelZoneUpdateResponse;

public final class Main {
private Main() {}

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

ChannelZoneUpdateParams params = ChannelZoneUpdateParams.builder()
.channelZoneId("channel_zone_id")
.channels(0L)
.build();
ChannelZoneUpdateResponse channelZone = client.channelZones().update(params);
}
}
require "telnyx"

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

channel_zone = telnyx.channel_zones.update("channel_zone_id", channels: 0)

puts(channel_zone)
<?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 {
$channelZone = $client->channelZones->update('channel_zone_id', channels: 0);

var_dump($channelZone);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx channel-zones update \
--api-key 'My API Key' \
--channel-zone-id channel_zone_id \
--channels 0
curl --request PUT \
--url https://api.telnyx.com/v2/channel_zones/{channel_zone_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channels": 123
}
'
{
  "record_type": "channel_zone",
  "countries": [
    "BE",
    "EL",
    "LT",
    "PT",
    "BG",
    "ES",
    "LU",
    "RO",
    "CZ",
    "FR",
    "HU",
    "SI",
    "DK",
    "HR",
    "MT",
    "SK",
    "DE",
    "IT",
    "NL",
    "FI",
    "EE",
    "CY",
    "AT",
    "SE",
    "IE",
    "LV",
    "PL"
  ],
  "id": "1653e6a1-4bfd-4857-97c6-6a51e1c34477",
  "name": "Euro channel zone",
  "channels": 7,
  "created_at": "2019-01-23T18:10:02.574Z",
  "updated_at": "2019-01-23T18:10:02.574Z"
}
{
"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

channel_zone_id
string
required

Channel zone identifier

Body

application/json

Quantity of reserved channels and organizational update option

channels
integer<int64>
required

The number of reserved channels

Response

Successfuly patched channel zone

record_type
enum<string>
required
Available options:
channel_zone
Example:

"channel_zone"

countries
string[]
required

List of countries (in ISO 3166-2, capitalized) members of the billing channel zone

Example:
[
"BE",
"EL",
"LT",
"PT",
"BG",
"ES",
"LU",
"RO",
"CZ",
"FR",
"HU",
"SI",
"DK",
"HR",
"MT",
"SK",
"DE",
"IT",
"NL",
"FI",
"EE",
"CY",
"AT",
"SE",
"IE",
"LV",
"PL"
]
id
string
required
Example:

"1653e6a1-4bfd-4857-97c6-6a51e1c34477"

name
string
required
Example:

"Euro channel zone"

channels
integer<int64>
required
Example:

7

created_at
string

ISO 8601 formatted date of when the channel zone was created

Example:

"2019-01-23T18:10:02.574Z"

updated_at
string

ISO 8601 formatted date of when the channel zone was updated

Example:

"2019-01-23T18:10:02.574Z"