Update the voice settings
/v1/voice/settingsconst settings = await bird.voice.settings.update({
inbound_configuration: { route: { type: "trunk", trunk_id: "spt_01krdgeqcxet5s7t44vh8rt9mg" } },
});
console.log(settings.inbound_configuration.route.type);from bird import VoiceCallRouteTrunk, VoiceCallRouteWritable, VoiceSettingsInboundConfigurationPut
settings = client.voice.settings.update(
inbound_configuration=VoiceSettingsInboundConfigurationPut(
route=VoiceCallRouteWritable(
VoiceCallRouteTrunk(type="trunk", trunk_id="spt_01krdgeqcxet5s7t44vh8rt9mg")
),
),
)
print(settings.inbound_configuration.route.root.type)bird voice settings update --body-file - <<'JSON'
{
"inbound_configuration": {
"route": {
"type": "trunk",
"trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg"
}
}
}
JSONcurl -X PATCH "https://us1.platform.bird.com/v1/voice/settings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbound_configuration": {
"route": {
"type": "trunk",
"trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg"
}
}
}'{
"inbound_configuration": {
"route": {
"type": "reject"
}
},
"daily_spend_limit": {
"currency_code": "EUR",
"limit": {
"amount": "0.00995",
"currency_code": "USD"
},
"used": {
"amount": "0.00995",
"currency_code": "USD"
},
"remaining": {
"amount": "0.00995",
"currency_code": "USD"
},
"default_limit": {
"amount": "0.00995",
"currency_code": "USD"
},
"max_limit": {
"amount": "0.00995",
"currency_code": "USD"
},
"workspace_limit": {
"amount": "0.00995",
"currency_code": "USD"
}
}
}
Changes your workspace's voice settings. Omit a field to leave it as it is.
inbound_configuration.route applies to every Bird number that has no inbound route of its
own, from the next call it receives. A number with its own route keeps it, and verified
caller IDs receive no calls.
The route is checked the same way as a number's: a trunk must be yours and
have inbound calling enabled, and a forward target must be one of your
verified caller IDs, otherwise the update returns 412. A trunk_id that is not
one of your trunks returns 404. A ring_group_id that is not one of your ring
groups or the default group returns 422. Deleting the trunk, or
turning off its inbound calling, sets the default back to "reject".
If a number with a live emergency service follows this default, changing it
to anything other than a browser ring group or inbound-enabled SIP trunk
returns 412.
daily_spend_limit.workspace_limit sets your workspace's own daily spend limit. It can be
above or below default_limit, up to max_limit, and must be in your organization's
wallet currency, otherwise the update returns 422. An organization without a wallet cannot
set a limit yet and gets 422 until it has one. Null removes it so the default applies.
Calls already in progress are never ended; the limit applies from the next call.
Request Payload
inbound_configurationThe route for calls arriving on any of your Bird numbers that has no inbound route of its own; verified caller IDs receive no calls. It takes effect on the next call to each of those numbers. Numbers with their own route keep it.
daily_spend_limitResponse Payload
inbound_configurationWhat happens to a call arriving for any of your Bird numbers that has no inbound route of its own.
daily_spend_limitThe workspace's daily Voice spend limit and today's usage toward it. Null until your organization has a wallet, since amounts are in its currency.
Show child attributes
daily_spend_limit.currency_codeThe organization's wallet currency, which every amount here is in.
daily_spend_limit.limitThe daily limit calls are admitted against: the workspace limit when one is set, otherwise the default, and never more than max_limit. Null when there is no limit.
daily_spend_limit.usedUsed toward today's limit, 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.
daily_spend_limit.remainingWhat is left of the limit today, never below zero. Null when there is no limit or today's usage cannot be read.
daily_spend_limit.resets_atWhen usage resets to zero, at midnight UTC.
daily_spend_limit.default_limitThe daily limit a workspace has until it sets its own. Null when there is no default limit.
daily_spend_limit.max_limitThe highest daily limit this workspace can set. Null when there is no maximum.
daily_spend_limit.workspace_limitThe daily limit this workspace set for itself. Null when it uses the default.
Related resources
Continue with the documentation, guides and examples for this topic.