---
title: "Cancel multiple dedicated numbers"
canonical: "https://bird.com/docs/api/reference/cancel-workspace-number-bulk"
---

# Cancel multiple dedicated numbers

`POST /v1/numbers/bulk-cancel`

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.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
const answer = await bird.numbers.cancelBulk({
  number_ids: [
    "nda_01krdgeqcxet5s7t44vh8rt9mg",
    "nda_01krdgeqcxet5s7t44vh8rt9mh",
  ],
});
for (const item of answer.data) console.log(item.number_id, item.outcome);
```

Examples: [TypeScript](/docs/api/reference/cancel-workspace-number-bulk.ts.md) · [Python](/docs/api/reference/cancel-workspace-number-bulk.py.md) · [Go](/docs/api/reference/cancel-workspace-number-bulk.go.md) · [PHP](/docs/api/reference/cancel-workspace-number-bulk.php.md) · [cURL](/docs/api/reference/cancel-workspace-number-bulk.curl.md)

## Example response `200`

```json
{
  "data": [
    {
      "number_id": "nda_01krdgeqcxet5s7t44vh8rt9mg",
      "outcome": "scheduled",
      "releases_at": "2026-12-01T00:00:00Z"
    }
  ]
}
```

## Header parameters

- `Idempotency-Key` (string, optional)

  Client-supplied key. On operations supporting request deduplication, a retained
  response is replayed for duplicate requests with the same key within the
  idempotency window (3 hours by default). This protection requires a workspace,
  organization, or staff-account scope. User-only and unscoped unauthenticated operations,
  streams, and operations with a separate replay contract do not use this
  response replay.

  On a supported operation, if idempotency protection is unavailable before execution, the API returns
  `503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with
  backoff using the same key and request. An operation that takes effect before
  its response is retained can still execute again on retry.

  Two distinct 409 errors signal misuse:

  - `request_in_progress` (E01004): The same key is currently being
    processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  - `idempotency_key_reuse` (E01005): The same key has already completed
    against a different request body or method. Generate a new key.

  Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Request body

- `number_ids` (array of string, required): Select up to 25 distinct numbers from one workspace.

## Response body

- `data` (array of object, required): One outcome per number, in request order.
- `data.number_id` (string, required): Identifier of a number allocated to your workspace, as returned in the id field of `GET /v1/numbers`.
- `data.outcome` (string, required)

  A 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_at` (string): End of the paid period for a scheduled cancellation.
- `data.released_at` (string): Time of release for an immediately released number.
- `data.error` (object): Reason for a failed cancellation. Unattempted and unknown outcomes carry E01037.
- `data.error.type` (string, required)

  Machine-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.code` (string, required): Specific 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.message` (string, required): Human-readable explanation of why this row failed.

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
