---
title: "Cancel a phone-number purchase or an active rental"
method: DELETE
path: "/numbers/phones/{id}"
tags: ["Numbers"]
---

# Cancel a phone-number purchase or an active rental

`DELETE /numbers/phones/{id}`

Cancels a Mobilerun Phone. The outcome depends on the number's current state:

- If the number is still awaiting payment and no payment for it is currently being processed, the checkout is closed immediately and the number is retired.
- If the number is on the standard paid plan and already paid and in service, cancellation is scheduled for the end of the current billing period rather than taking effect immediately. The number stays usable through the period already paid for, with no partial refund. Calling this again while a cancellation is already scheduled is a no-op that returns the same result. The response's `state` reflects this as `cancel_scheduled` with `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing confirms the cancellation.

Any other state (already refunding, a permanent billing failure, a payment currently being processed, an included-plan number, or a non-hosted/BYO number) returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't owned by the caller.

## Path parameters

- `id` string, uuid, required

## Response `200`

Number cancelled

- object
  - `data` PublicNumber, required
    - `id` string, uuid, required
    - `phoneNumber` string, nullable, required
    - `state` 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed', required
    - `countryCode` string, nullable, required
    - `capabilities` string[], nullable, required
    - `canSend` boolean, required
    - `purpose` string, nullable, required
    - `checkoutUrl` string, nullable, required
    - `currentPeriodEnd` string, date-time, nullable, required
    - `cancelAtPeriodEnd` boolean, required
    - `cancellable` boolean, required
    - `createdAt` string, date-time, nullable, required
    - `updatedAt` string, date-time, nullable, required

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict — see `reason` for the stable, machine-readable cause
- `500` — Internal Server Error
- `503` — Service Unavailable — phone numbers are disabled for this deployment (see `reason`)

---

[API](https://skmtc.dev/droidrun/apis/droidrun-cloud.md) · [All operations](https://skmtc.dev/droidrun/apis/droidrun-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/droidrun/droidrun-cloud/revisions/a1453ac769d4/schema)
