# PortInFailed

Fired when a port-in fails at any stage, or is cancelled.

> Enterprise API · https://developer.telgea.com/docs/enterprise/webhooks/port-in-failed

## PortInFailed [#portinfailed]

Fired when a port-in fails. That can happen at any stage: during submission, during the acceptance check, or on the porting date itself. It also fires when the port-in is cancelled, with `code` and `reason` set to `CANCELLED`.

After a failure the port-in is final, and a new port-in can be submitted for the same number.

## Payload [#payload]

```json event=PortInFailed
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "eventType": "PortInFailed",
  "timestamp": "2026-04-01T06:00:00.000Z",
  "organizationId": "b5e2d7f3-a1c4-4e89-9f6b-3d8a7c5e1024",
  "data": {
    "portInId": "d4e5f6a7-b8c9-0123-d456-789012345678",
    "numberId": "f7a8b9c0-d1e2-3456-f789-012345678901",
    "phoneNumber": "+4512345678",
    "countryCode": "DK",
    "state": "FAILED",
    "executionDate": "2026-04-01",
    "failureDetails": {
      "code": "INTERNAL_ERROR",
      "text": "Something went wrong on our side. You don't need to do anything."
    }
  }
}
```

`failureDetails` may also carry `reason` and `field` when the failure could be classified. `text` says what happened and what to do next, in English, for showing to your customer; branch on `reason`, because the wording of `text` may change. See the [port-in guide](https://developer.telgea.com/docs/enterprise/guides/port-in#failure-codes) for every failure code and reason, and what to do about each.
