---
title: "Cancel a queued number order"
method: POST
path: "/v1/numbers/orders/{id}/cancel"
---

# Cancel a queued number order

`POST /v1/numbers/orders/{id}/cancel`

## Request

- Base URL: `https://volai.cz`
- URL: `https://volai.cz/v1/numbers/orders/{id}/cancel`
- Auth: HTTP bearer

Cancels an order that is still queued (`pending`) - no body, returns the order with status `cancelled`. Nothing is charged (the fee is only deducted once the number is ready) and an account that has never topped up can order again. An order being provisioned right now (`provisioning`) cannot be cancelled - it returns 409 `in_progress`, try again in a few minutes; neither can a `done` or `failed` one (409 `invalid_transition`) - release a finished number with `DELETE /v1/numbers/{e164}` instead. Cancelling an already cancelled order is harmless (it is returned unchanged).

## Path parameters

- `id` string, required

## Response `200`

Cancelled order

- object
  - `order` object, required
    - `id` string, required
    - `status` 'pending' | 'provisioning' | 'done' | 'failed' | 'cancelled', required
    - `address` string, required
    - `e164` string
    - `error` string
    - `createdAt` number, required
    - `updatedAt` number, required

## Other responses

- `401`: Error codes: unauthorized (request).
- `403`: Error codes: account_suspended (account).
- `404`: Error codes: not_found (account).
- `409`: Error codes: in_progress (busy), invalid_transition (request).
- `429`: Error codes: rate_limited (busy).
- `500`: Error codes: internal_error (service).

---

[API](https://skmtc.dev/volai/apis/volai-rest-api.md) · [All operations](https://skmtc.dev/volai/apis/volai-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volai/apis/volai-rest-api/revisions/12029b05e2fa?raw)
