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);
响应200
{
  "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.

请求载荷

destinations
array of object
必填

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.

显示子参数
destinations.country_code
string
必填

ISO 3166-1 alpha-2 country code.

destinations.enabled
boolean

Whether to enable (true) or disable (false) this destination country. Omit it to leave the country's enabled setting unchanged.

destinations.daily_spend_limit
object

Sets or removes this country's daily spend limit; omit it to leave the limit unchanged. Once today's spend reaches the limit, new calls to the country are refused, verification calls included, whether or not it is enabled; a call already in progress is not cut off, so spend can pass the limit by what that call costs.

显示子参数

响应载荷

data
array of object
必填

The Voice destination countries, each annotated with your workspace's enabled setting.

显示子属性
total
integer
必填

Total number of destination countries.