---
title: "Cancel number replacement setup"
method: DELETE
path: "/lines/{e164}/lock"
---

# Cancel number replacement setup

`DELETE /lines/{e164}/lock`

## Request

- Base URL: `https://osis.co/api/v1/comms`
- URL: `https://osis.co/api/v1/comms/lines/{e164}/lock`
- Auth: HTTP bearer

Cancel only an unsubmitted preparation (number_locked), without changing service or contacting the carrier. Supply the current port.id to avoid canceling a newer setup. Submitted, in-progress, completed, and failed transfer records cannot be canceled here. Cleanup remains available when new porting is disabled. Scope: comms_lines_write. Limit: 10 requests every 15 minutes per line.

## Path parameters

- `e164` string, required

## Request body

- object
  - `port_id` string, required: Current preparation ID from POST /lock or GET /port

## Response `200`

Preparation canceled; current number and service unchanged

- object
  - `cancelled` true

## Other responses

- `400`: Invalid or missing port_id
- `401`: API key is missing or wrong
- `403`: Your key doesn't have the scope this needs
- `404`: No matching preparation in this workspace
- `409`: Setup changed or a transfer was already submitted
- `429`: Too many requests. Slow down and retry.

---

[API](https://skmtc.dev/osis/apis/comms-api.md) · [All operations](https://skmtc.dev/osis/apis/comms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/osis/apis/comms-api/revisions/59a4c0ba8936?raw)
