Cancel multiple dedicated numbers
/v1/numbers/bulk-cancelconst answer = await bird.numbers.cancelBulk({
number_ids: [
"nda_01krdgeqcxet5s7t44vh8rt9mg",
"nda_01krdgeqcxet5s7t44vh8rt9mh",
],
});
for (const item of answer.data) console.log(item.number_id, item.outcome);answer = client.numbers.cancel_bulk(
number_ids=["nda_01krdgeqcxet5s7t44vh8rt9mg", "nda_01krdgeqcxet5s7t44vh8rt9mh"]
)
for item in answer.data:
print(item.number_id, item.outcome)answer, err := client.Numbers.CancelBulk(context.Background(), bird.NumbersCancelBulkParams{
NumberIDs: []string{"nda_01krdgeqcxet5s7t44vh8rt9mg", "nda_01krdgeqcxet5s7t44vh8rt9mh"},
})
if err != nil {
log.Fatal(err)
}
for _, item := range answer.Data {
fmt.Println(item.NumberId, item.Outcome)
}$answer = $bird->numbers->cancelBulk(
(new \MessageBird\Wire\Model\NumberBulkCancel())->setNumberIds([
'nda_01krdgeqcxet5s7t44vh8rt9mg', 'nda_01krdgeqcxet5s7t44vh8rt9mh',
]),
);
foreach ($answer->getData() ?? [] as $item) {
echo $item->getNumberId(), ' ', $item->getOutcome();
}curl -X POST "https://us1.platform.bird.com/v1/numbers/bulk-cancel" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"number_ids": [
"nda_01krdgeqcxet5s7t44vh8rt9mg"
]
}'{
"data": [
{
"number_id": "nda_01krdgeqcxet5s7t44vh8rt9mg",
"outcome": "scheduled",
"releases_at": "2026-12-01T00:00:00Z"
}
]
}
Cancel up to 25 numbers in one workspace. Each billed number remains allocated until its paid period ends. Existing restrictions still apply. On first dispatch, each submitted number counts toward the same rate limit as an individual cancellation (60 per minute by default). If the list exceeds the configured rate limit, the API returns 422 with the maximum batch size. If the list fits that limit but exceeds the remaining budget, the API returns 429 with Retry-After. Both responses leave every number unchanged. A number without a subscription is released immediately. Repeating a scheduled cancellation keeps its release date. Read each result to see which cancellations succeeded and why a number could not be canceled. Retry unattempted numbers in a new request with a new key. Check the allocation before retrying an unknown outcome. To retrieve a stored response without consuming more cancellation capacity, use the same key and identical request.
Request Payload
number_idsSelect up to 25 distinct numbers from one workspace.
Response Payload
dataOne outcome per number, in request order.
Show child attributes
data.number_idIdentifier of a number allocated to your workspace, as returned in the id field of GET /v1/numbers.
data.outcomeA scheduled number remains allocated with its current restrictions until its release date. A released number was given up immediately. A failed item was refused. Retry unattempted items in a new request. For an unknown outcome, check the number before retrying because the cancellation may have taken effect.
Possible values: scheduled, released, failed, not_attempted, unknown
data.releases_atEnd of the paid period for a scheduled cancellation.
data.released_atTime of release for an immediately released number.
data.errorReason for a failed cancellation. Unattempted and unknown outcomes carry E01037.
Show child attributes
data.error.typeMachine-readable error category for this row, from the same closed vocabulary as the top-level error type.
Possible values: auth_error, bad_request_error, billing_error, client_closed_request_error, conflict_error, gone_error, internal_error, misdirected_error, not_found_error, not_implemented_error, payload_too_large_error, permission_error, precondition_error, rate_limit_error, service_unavailable_error, too_early_error, validation_error
data.error.codeSpecific error code for this row, from the same catalog as the top-level error code. The code distinguishes cases a coarse type cannot, such as two different reasons a row is invalid.
data.error.messageHuman-readable explanation of why this row failed.
Related resources
Continue with the documentation, guides and examples for this topic.