Update an allocated number
/v1/numbers/{number_id}const allocated = await bird.numbers.update("nda_01krdgeqcxet5s7t44vh8rt9mg", {
name: "Support line",
reference: "STORE-042",
});
console.log(allocated.name, allocated.reference);allocated = client.numbers.update(
"nda_01krdgeqcxet5s7t44vh8rt9mg", name="Support line", reference="STORE-042"
)
print(allocated.name, allocated.reference)allocated, err := client.Numbers.Update(ctx, "nda_01krdgeqcxet5s7t44vh8rt9mg", bird.NumbersUpdateParams{
Name: bird.Value("Support line"),
Reference: bird.Value("STORE-042"),
})
if err != nil {
log.Fatal(err)
}
if allocated.Name != nil {
fmt.Println(*allocated.Name)
}
if allocated.Reference != nil {
fmt.Println(*allocated.Reference)
}$allocated = $bird->numbers->update(
'nda_01krdgeqcxet5s7t44vh8rt9mg',
(new \MessageBird\Wire\Model\NumberUpdate())->setName('Support line')->setReference('STORE-042'),
);
echo $allocated->getName(), ' ', $allocated->getReference(), "\n";bird numbers update <number-id> \
--name 'Support line' \
--reference STORE-042curl -X PATCH "https://us1.platform.bird.com/v1/numbers/{number_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Support line",
"reference": "STORE-042"
}'{
"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"
}
]
}
}
Updates the name and reference for a number allocated to your workspace. Omit a field to keep its current value, or send null to clear it. Leading and trailing whitespace is removed. References need not be unique.
Paramètres
number_idstringIdentifier returned by the allocated-number list.
Corps de la requête
nameA name for this number in your workspace, such as Support line. Send null to clear it, or omit it to keep the current name.
referenceYour own reference for this number, such as an identifier from your records. References need not be unique. Send null to clear it, or omit it to keep the current reference.
Contenu de la réponse
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_codenumber_typePhysical type of this phone number.
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.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.