List Voice destination countries
GET
/v1/voice/destinations
const destinations = await bird.voice.destinations.list();
for (const destination of destinations.data) {
console.log(destination.country_code, destination.enabled, destination.status);
}destinations = client.voice.destinations.list()
for destination in destinations.data:
print(destination.country_code, destination.enabled, destination.status)destinations, err := client.Voice.Destinations.List(context.Background())
if err != nil {
log.Fatal(err)
}
for _, destination := range destinations.Data {
fmt.Println(destination.CountryCode, destination.Enabled, destination.Status)
}$destinations = $bird->voice->destinations->list();
foreach ($destinations->getData() ?? [] as $destination) {
echo $destination->getCountryCode(), ' ', $destination->getEnabled() ? 'on' : 'off', "\n";
}bird voice destinations listcurl -X GET "https://us1.platform.bird.com/v1/voice/destinations" \
-H "Authorization: Bearer $TOKEN"Antwort200
{
"data": [
{
"country_code": "US",
"country_name": "Netherlands",
"dial_code": "31",
"region": "western_europe",
"super_region": "europe",
"status": "available"
}
]
}
Returns every country the Voice service supports, each annotated with whether your workspace has enabled calling to it and whether the country is currently callable. Use this to render and manage your destination allowlist.
Antwort-Payload
data
array of object
erforderlich
The Voice destination countries, each annotated with your workspace's enabled setting.
Untergeordnete Attribute anzeigen
data.country_code
string
erforderlich
data.country_name
string
erforderlich
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
erforderlich
Whether your workspace has enabled calling to this country.
data.status
string
erforderlich
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
erforderlich
Whether we treat this country as a high-risk calling destination.
total
integer
erforderlich
Total number of destination countries.
Verwandte Ressourcen
Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema. Die Ressourcen sind auf Englisch.
Das Konzept verstehenShould I use a Bird SDK or call the API directly?Dem Lernpfad folgenBuild your first integrationImplementierungsleitfadenSend your first email
Implementierungs-Briefing erhalten