Sign inGet Started

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);
Antwort200
{
  "data": [
    {
      "country_code": "US",
      "country_name": "Netherlands",
      "dial_code": "31",
      "region": "western_europe",
      "super_region": "europe",
      "status": "available",
      "daily_spend_limit": {
        "limit": {
          "amount": "0.00995",
          "currency_code": "USD"
        },
        "used": {
          "amount": "0.00995",
          "currency_code": "USD"
        },
        "remaining": {
          "amount": "0.00995",
          "currency_code": "USD"
        },
        "resets_at": "2026-10-09T00:00:00Z"
      }
    }
  ]
}

Enables or disables specific destination countries for your workspace, and sets or removes their daily spend limits. 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; removing a daily spend limit is the exception and accepts any country code. A daily spend limit caps what your workspace spends on calls to a country each day, whether or not it is enabled.

Anfrage-Nutzlast

destinations
array of object
erforderlich

The destination countries to change. Only the countries listed here change, and only the fields you send; anything else keeps its current setting. A country listed more than once takes its last enabled, but may set or remove daily_spend_limit only once. A limit can be set only on a country the Voice service supports; removing one accepts any country code. Otherwise the request is rejected and nothing changes.

Untergeordnete Parameter anzeigen

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

ISO 3166-1 alpha-2 country code.

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

The commercial region this country belongs to, for grouping a destination list the way it is bought rather than alphabetically. null for a country we have not assigned yet. Bird defines these regions independently of ISO and UN M49. A country can move between them, so treat the set as open.

Possible values (may grow over time): western_europe, nordics_baltics, southern_europe, central_eastern_europe, north_america, latin_america_caribbean, middle_east_north_africa, sub_saharan_africa, central_asia_caucasus, south_asia, south_east_asia, east_asia, oceania

data.super_region
nullable string

The continent-scale group the region rolls up into. Derived from region, and null whenever that is. Treat the set as open.

Possible values (may grow over time): europe, americas, middle_east_africa, asia_pacific

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.

data.daily_spend_limit
nullable object
erforderlich

Your workspace's daily spend limit for calls to this country and today's usage toward it. It applies whether or not the country is enabled, including to verification calls. Null when you have not set one, before your organization has a wallet, or while your wallet currency cannot be read; a limit you set is still enforced then.

Untergeordnete Attribute anzeigen
data.daily_spend_limit.limit
object
erforderlich

The most your workspace can spend on calls to this country each day, in your organization's wallet currency. Calls are also held to the workspace's own daily limit, and whichever is reached first refuses the call.

Untergeordnete Attribute anzeigen
data.daily_spend_limit.limit.amount
string
erforderlich

Decimal amount as a string, in major currency units.

data.daily_spend_limit.limit.currency_code
string
erforderlich

ISO 4217 currency code.

data.daily_spend_limit.used
nullable object
erforderlich

Used toward today's limit for this country, including calls in progress. A call counts its expected cost when it starts; the part it did not use returns when it is billed. Null when today's usage cannot be read right now; the limit is still enforced.

Untergeordnete Attribute anzeigen
data.daily_spend_limit.remaining
nullable object
erforderlich

What is left of this country's limit today, never below zero. Null when today's usage cannot be read.

Untergeordnete Attribute anzeigen
data.daily_spend_limit.resets_at
string
erforderlich

When usage resets to zero, at midnight UTC.

total
integer
erforderlich

Total number of destination countries.

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.