---
title: "Discard a failed port-in"
method: POST
path: "/v1/port-ins/{portInId}/discard"
tags: ["Port-Ins"]
---

# Discard a failed port-in

`POST /v1/port-ins/{portInId}/discard`

## Request

- Base URL: `https://api.telgea.com`
- URL: `https://api.telgea.com/v1/port-ins/{portInId}/discard`
- Auth: API key in header `x-api-key`

Gives up on a port-in that ended in REJECTED or FAILED, when you will not submit it again. The number leaves the plan and stays with the losing carrier. Unless the user has another number, the plan reads `INACTIVE`, so you can create a user plan with a new number or port in a different one.

The port-in stays readable at its own id and keeps its `REJECTED` or `FAILED` status. A discard shows as the number leaving the plan it was being ported onto, and the number's port-ins also leave `GET /v1/port-ins/number/{numberId}`.

Only a port-in that ended in REJECTED or FAILED can be discarded, and not while a newer port-in for the same number is in flight or once one has succeeded. Either is refused with 400 BAD_REQUEST. Discarding a port-in that is already discarded succeeds and changes nothing.

## Path parameters

- `portInId` string, uuid, required: UUID of the port-in request.

## Headers

- `idempotency-key` string: A value unique to this request, of 1 to 255 printable ASCII characters — a UUID is the usual choice. Retry with the same key within 24 hours and you get the original response back, even if it was a failure, and nothing is done twice. Send a new key whenever you change the request. Keys are private to your API key and organisation.

## Response `204`

Port-in discarded. No content returned.

## Other responses

- `400`: Request failed schema validation, or the port-in cannot be discarded: it has not failed, or a newer port-in has taken over its number
- `401`: Missing or invalid API key in the X-API-Key header
- `403`: Insufficient permissions to discard port-ins
- `404`: Port-in not found. The specified ID does not match any existing port-in.
- `429`: The API key has used its request quota for the current window. `Retry-After` says how many seconds until it resets.
- `500`: Internal server error. Contact support if this persists.

---

[API](https://skmtc.dev/telgea/apis/telgea-api.md) - [All operations](https://skmtc.dev/telgea/apis/telgea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/telgea/apis/telgea-api/revisions/4e8f8c04fe9e?raw)
