Get an allocated number
/v1/numbers/{number_id}const allocated = await bird.numbers.get("nda_01krdgeqcxet5s7t44vh8rt9mg");
// A country that asks for ownership paperwork answers here; most answer null.
console.log(allocated.status, allocated.ownership ?? "no paperwork required");allocated = client.numbers.get("nda_01krdgeqcxet5s7t44vh8rt9mg")
# A country that asks for ownership paperwork answers here; most answer None.
print(allocated.status, allocated.ownership or "no paperwork required")allocated, err := client.Numbers.Get(context.Background(), "nda_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
// A country that asks for ownership paperwork answers on Ownership; most
// answer nil.
fmt.Println(allocated.Status)$allocated = $bird->numbers->get('nda_01krdgeqcxet5s7t44vh8rt9mg');
// A country that asks for ownership paperwork answers here; most answer null.
echo $allocated->getStatus(), "\n";bird numbers get <number-id>curl -X GET "https://us1.platform.bird.com/v1/numbers/{number_id}" \
-H "Authorization: Bearer $TOKEN"{
"id": "nda_01krdgeqcxet5s7t44vh8rt9mg",
"kind": "dedicated",
"country_code": "US",
"number_type": "mobile",
"capabilities": [
"sms"
],
"status": "active",
"ownership": {
"submission_id": "csb_01krdgeqcxet5s7t44vh8rt9mg",
"status": "needs_input",
"next": [
{
"kind": "operation"
}
]
},
"pricing": {
"recurring_price": {
"amount": "0.00995",
"currency_code": "USD"
},
"recurring_period": {
"unit": "month",
"count": 1
},
"intervals_per_charge": 12,
"error": null
}
}
Returns a single phone number allocated to your workspace, whether it is a dedicated number you bought or a shared number managed for you. Numbers you have released are no longer returned. An allocated number is not always enough to send from it: some countries also require an approved registration for the sender.
Parámetros
number_idstringIdentifier of the number, as returned in the id field of GET /v1/numbers.
Carga de respuesta
nameThe name you gave this number in your workspace. Null when no name is set.
referenceYour own reference for this number in your workspace. Null when no reference is set.
idIdentifier of this allocated number. Pass it as number_id to read this number, or to cancel or release it when kind is dedicated.
kindHow this number is allocated. dedicated belongs to your workspace and is billed as a subscription. shared is provided through Bird-managed shared infrastructure and is not owned or billed as a workspace subscription.
Possible values: dedicated, shared
numberPhone number in E.164 format.
country_codeISO 3166-1 alpha-2 country code.
number_typePhysical type of this phone number.
Possible values (may grow over time): mobile, local, national, short_code, short_code_fteu, toll_free
capabilitiesCapabilities supported by this number.
statusThe allocation and ownership-approval status of this number.
activemeans this number is allocated to your workspace and usable.pending_ownership_registrationmeans this number is allocated to your workspace and billed, but outbound SMS and both inbound and outbound voice calls are blocked until ownership registration is approved and activation completes, or the ownership requirement is withdrawn. This ownership status does not gate inbound SMS or WhatsApp. Readownership.statusandownership.nextfor the current decision and remaining work.releasedmeans this number is no longer allocated to your workspace.
An allocated number is not always enough to send from it: some destination countries also require an approved registration for the sender.
Possible values: active, pending_ownership_registration, released
allocated_atWhen this number was allocated to your workspace.
releases_atWhen a scheduled release of this number takes effect, at the end of its current billing period. The number stays allocated, with its current status, until then. null when no release is scheduled.
released_atWhen this number was released. null while it is still allocated to your workspace.
ownershipOwnership paperwork and activation progress. null when no ownership requirements, recorded block, or recorded decision apply, or when requirements or progress cannot be read and no ownership block or decision has been recorded. A recorded block still returns an ownership object with status: unknown when progress cannot be read; retry the read. We manage the paperwork for shared short codes, so this field is always null for them. Other sending requirements can apply even when ownership registration is complete.
pricingWhat your organization pays for this number. null for a shared number, and, when the price was read, for a number with no live subscription. Otherwise its prices are null when no price applies. When the price could not be read, every dedicated number carries this object with error set, whether or not it has a live subscription.
Mostrar atributos secundarios
pricing.recurring_priceWhat your organization is charged for this number per recurring_period, net of tax, in the currency this number is charged in: your billing currency, unless this number's subscription predates a change of your billing currency, in which case its own currency is returned. null when no price applies.
Mostrar atributos secundarios
pricing.recurring_price.amountDecimal amount as a string, in major currency units.
pricing.recurring_price.currency_codeISO 4217 currency code.
pricing.recurring_periodThe rate's interval, or a fixed price's whole renewal period. null when recurring_price is null.
pricing.intervals_per_chargeHow many recurring_periods one renewal charges. When releases_at is set no renewal follows, and the value still describes the subscription's cadence until the release. 1 for a fixed price. null when recurring_price is null.
pricing.errorA retryable failure to read the price. Retry a GET of the number; do not repeat a completed write. null when the price was read or no price applies.
Recursos relacionados
Continúa con la documentación, guías y ejemplos de este tema.