Update enabled Voice destination countries
PATCH
/v1/voice/destinations
const destinations = await bird.voice.destinations.update({
destinations: [{ country_code: "PT", enabled: true }],
});
console.log(destinations.data?.length ?? 0);destinations = client.voice.destinations.update(
destinations=[{"country_code": "PT", "enabled": True}]
)
print(len(destinations.data))destinations, err := client.Voice.Destinations.Update(context.Background(), bird.VoiceDestinationsUpdateParams{
Destinations: []bird.DestinationSetting{{CountryCode: "PT", Enabled: true}},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(len(destinations.Data))$destinations = $bird->voice->destinations->update(
(new VoiceDestinationsUpdate())->setDestinations([
(new DestinationSetting())->setCountryCode('PT')->setEnabled(true),
]),
);
echo count($destinations->getData() ?? []), "\n";bird voice destinations update --body-file - <<'JSON'
{
"destinations": [
{
"country_code": "NL",
"enabled": true
},
{
"country_code": "GB",
"enabled": false
}
]
}
JSONcurl -X PATCH "https://us1.platform.bird.com/v1/voice/destinations" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"destinations": [
{
"country_code": "NL",
"enabled": true
},
{
"country_code": "GB",
"enabled": false
}
]
}'Response200
{
"data": [
{
"country_code": "US",
"country_name": "Netherlands",
"dial_code": "31",
"region": "western_europe",
"super_region": "europe",
"status": "available"
}
]
}
Enables or disables specific destination countries for your workspace. Only the countries listed in the request change; any country you do not list keeps its current setting. Each code must be a country the Voice service supports, or the request is rejected and nothing changes.
Request Payload
destinations
array of object
required
The destination countries to enable or disable. Only the countries listed here change; any country you do not list keeps its current setting.
Show child parameters
destinations.country_code
string
required
ISO 3166-1 alpha-2 country code.
destinations.enabled
boolean
required
Whether to enable (true) or disable (false) this destination country.
Response Payload
data
array of object
required
The Voice destination countries, each annotated with your workspace's enabled setting.
Show child attributes
data.country_code
string
required
data.country_name
string
required
Full English country name.
data.dial_code
string
International dialling prefix, without the leading plus. Absent for countries that have none.
data.region
nullable string
data.super_region
nullable string
data.enabled
boolean
required
Whether your workspace has enabled calling to this country.
data.status
string
required
This country's Voice callability at the destination level, independent of your enabled setting. available means we place calls there; not_supported means we do not.
Possible values (may grow over time): available, not_supported
data.high_risk_destination
boolean
required
Whether we treat this country as a high-risk calling destination.
total
integer
required
Total number of destination countries.
Related resources
Continue with the documentation, guides and examples for this topic. Resources are in English.
Understand the conceptShould I use a Bird SDK or call the API directly?Follow the learning pathBuild your first integrationImplementation guideSend your first email
Get an implementation brief