> This page is for Home.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

> Data connection lifecycle events in the emnify platform

| ID | Description                               |
| :- | :---------------------------------------- |
| 3  | [Create PDP Context](#create-pdp-context) |
| 5  | [Delete PDP Context](#delete-pdp-context) |

### Create PDP Context

A [Packet Data Protocol (PDP) context](https://www.emnify.com/iot-glossary#pdp-context) allows UE to exchange IP packets over the network.

A `Create PDP Context` event indicates the activation of data connectivity.

**Example**: a device has established a data session and started transferring data.
This device appears as **Online** in the [emnify Portal](/system-events/usage#emnify-portal) as long as there hasn't been a subsequent [Delete PDP Context](#delete-pdp-context) event.

#### Example JSON response: create PDP context accepted

```json maxLines=10
{
  "timestamp": "2021-10-27T08:38:02.000Z",
  "alert": false,
  "description": "New PDP Context successfully activated with SGSN CP=60.195.159.61, DP=117.72.59.30.",
  "id": 31877325941,
  "event_type": {
    "id": 3,
    "description": "Create PDP Context"
  },
  "event_source": {
    "id": 0,
    "description": "Network"
  },
  "event_severity": {
    "id": 0,
    "description": "Info"
  },
  "organisation": {
    "id": 1825,
    "name": "Test Org"
  },
  "endpoint": {
    "id": 20200078,
    "imei": "960407272413998",
    "ip_address": "189.79.243.228",
    "name": "Test Sim 2",
    "tags": null
  },
  "sim": {
    "iccid": "5746435358418205328",
    "id": 646486,
    "production_date": "2020-12-23T13:02:11.000Z"
  },
  "imsi": {
    "id": 12105613,
    "import_date": "2020-12-23T13:02:11.000Z",
    "imsi": "693601932595201"
  },
  "detail": {
    "country": {
      "mcc": "262",
      "name": "Germany",
      "country_code": "49",
      "iso_code": "de",
      "id": 74
    },
    "id": 3,
    "session_id": "d12c574f-e219-45a4-8836-d17a50f66fb1",
    "pdp_context": {
      "breakout_ip": "97.106.216.29",
      "rac": null,
      "sgsn_control_plane_ip_address": "117.72.59.30",
      "rat_type": 2,
      "tx_teid_data_plane": 557727595,
      "region": "eu-west-1",
      "apn": "em",
      "tx_teid_control_plane": 570842943,
      "tunnel_created": "2021-10-27T08:38:02",
      "ggsn_data_plane_ip_address": "150.85.110.76",
      "sgsn_data_plane_ip_address": "223.253.0.120",
      "rx_teid": 96601675,
      "ci": 5174,
      "imsi": "82186563190127",
      "lac": 921,
      "mcc": "262",
      "sac": null,
      "ggsn_control_plane_ip_address": "60.195.159.61",
      "mnc": "02",
      "nsapi": 5,
      "ue_ip_address": "101.124.109.214",
      "imeisv": "6887426203768011",
      "pdp_context_id": 51755555,
      "gtp_version": 1,
      "operator_id": "3",
      "tariff_profile_id": "395978", // coverage policy
      "ratezone_id": "8178", // coverage area
      "tariff_id": "555" // data plan
    },
    "name": "Vodafone"
  }
}
```

#### Example JSON response: create PDP context rejected because data service is disabled in the service profile

```json maxLines=10
{
  "timestamp": "2021-10-24T12:43:51.000Z",
  "alert": true,
  "description": "PDP Context Request rejected, because data service disabled in service profile.",
  "id": 2836707022,
  "event_type": {
    "id": 3,
    "description": "Create PDP Context"
  },
  "event_source": {
    "id": 1,
    "description": "Policy Control"
  },
  "event_severity": {
    "id": 1,
    "description": "Warn"
  },
  "organisation": {
    "id": 1222,
    "name": "Test Org"
  },
  "endpoint": {
    "id": 14002489,
    "imei": "211785743231328",
    "ip_address": "173.97.253.42",
    "name": "Test Sim 2",
    "tags": null
  },
  "sim": {
    "iccid": "41595256071723032296",
    "id": 801148,
    "production_date": "2020-12-23T13:02:11.000Z"
  },
  "imsi": {
    "id": 62004293,
    "import_date": "2020-12-23T13:02:11.000Z",
    "imsi": "175904061168404"
  }
}
```

#### Example JSON response: create PDP context rejected because the device doesn't have a quota

```json maxLines=10
{
  "timestamp": "2021-10-27T08:55:59.000Z",
  "alert": true,
  "description": "PDP Context Request rejected, because endpoint has no quota.",
  "id": 7745432124,
  "event_type": {
    "id": 3,
    "description": "Create PDP Context"
  },
  "event_source": {
    "id": 1,
    "description": "Policy Control"
  },
  "event_severity": {
    "id": 1,
    "description": "Warn"
  },
  "organisation": {
    "id": 177,
    "name": "Test Org"
  },
  "endpoint": {
    "id": 10238,
    "imei": "127957062642784",
    "ip_address": "113.252.159.78",
    "name": "Test Sim 2",
    "tags": null
  },
  "sim": {
    "iccid": "6300267938152764468",
    "id": 3012262,
    "production_date": "2020-12-23T13:02:11.000Z"
  },
  "imsi": {
    "id": 66367669,
    "import_date": "2020-12-23T13:02:11.000Z",
    "imsi": "85785128232645"
  }
}
```

#### Example JSON response: create PDP Context Request rejected because the device's quota volume is exhausted, and the defined action is to block data traffic

```json maxLines=10
{
  "timestamp": "2021-10-27T09:12:27.000Z",
  "alert": true,
  "description": "PDP Context Request rejected, because quota volume of endpoint is exhausted and defined action is to block data traffic.",
  "id": 7598008306,
  "event_type": {
    "id": 3,
    "description": "Create PDP Context"
  },
  "event_source": {
    "id": 1,
    "description": "Policy Control"
  },
  "event_severity": {
    "id": 1,
    "description": "Warn"
  },
  "organisation": {
    "id": 8087,
    "name": "Test Org"
  },
  "endpoint": {
    "id": 39063467,
    "imei": "454208457191395",
    "ip_address": "120.133.145.19",
    "name": "Test Sim 2",
    "tags": null
  },
  "sim": {
    "iccid": "91447762462599458698",
    "id": 609020,
    "production_date": "2020-12-23T13:02:11.000Z"
  },
  "imsi": {
    "id": 97534929,
    "import_date": "2020-12-23T13:02:11.000Z",
    "imsi": "715343715967543"
  }
}
```

#### Example JSON response: create PDP context request rejected because the SIM isn't activated

```json maxLines=10
{
  "timestamp": "2021-10-27T12:33:17.000Z",
  "alert": true,
  "description": "PDP Context Request rejected, because SIM is not activated.",
  "id": 117138486882,
  "event_type": {
    "id": 3,
    "description": "Create PDP Context"
  },
  "event_source": {
    "id": 1,
    "description": "Policy Control"
  },
  "event_severity": {
    "id": 1,
    "description": "Warn"
  },
  "organisation": {
    "id": 4823,
    "name": "Test Org"
  },
  "endpoint": {
    "id": 1257319,
    "imei": "25631320011492911",
    "ip_address": "230.105.77.310",
    "name": "Test Sim 2",
    "tags": null
  },
  "sim": {
    "iccid": "87901100765269508687",
    "id": 45142,
    "production_date": "2020-12-23T13:02:11.000Z"
  },
  "imsi": {
    "id": 497998,
    "import_date": "2020-12-23T13:02:11.000Z",
    "imsi": "76604441813689"
  }
}
```

### Delete PDP Context

Data session between the device and the network is deleted.

**Example**: a device disconnected and ended a data transfer.
The event details also show the data transmitted, and the device appears as **Attached** in the [emnify Portal](/system-events/usage#emnify-portal).

#### Example JSON response

```json maxLines=10
{
    "timestamp": "2021-10-27T08:40:10.000Z",
    "alert": false,
    "description": "PDP Context deleted.",
    "id": 1906081382592,
    "event_type": {
        "id": 5,
        "description": "Delete PDP Context"
    },
    "event_source": {
        "id": 0,
        "description": "Network"
    },
    "event_severity": {
        "id": 0,
        "description": "Info"
    },
    "organisation": {
        "id": 39089,
        "name": "Test Org"
    },
    "endpoint": {
        "id": 8163445,
        "imei": "82586199276110710",
        "ip_address": "104.86.8.106",
        "name": "Test Sim 2",
        "tags": null
    },
    "sim": {
        "iccid": "9335742231782809262",
        "id": 1931060,
        "production_date": "2020-12-23T13:02:11.000Z"
    },
    "imsi": {
        "id": 5216225,
        "import_date": "2020-12-23T13:02:11.000Z",
        "imsi": "49652622520507"
    },
    "detail": {
        "country": {
            "country_code": "49",
            "mcc": "262",
            "name": "Germany",
            "iso_code": "de",
            "id": 82
        },
        "volume": {
            "total": 0.641984,
            "rx": 0.418811,
            "tx": 0.223173
        },
        "id": 3,
        "session_id": "2a4ff039-fbb9-4eaa-b74c-2f0eaafaf624",
        "pdp_context": {
            "breakout_ip": null,
            "rac": null,
            "sgsn_control_plane_ip_address": "234.39.123.228",
            "rat_type": 2,
            "tx_teid_data_plane": 966839357,
            "region": "eu-west-1",
            "apn": null,
            "tx_teid_control_plane": 397629956,
            "tunnel_created": "2021-10-27T08:38:02",
            "ggsn_data_plane_ip_address": "225.129.61.136",
            "sgsn_data_plane_ip_address": "173.69.12.45",
            "rx_teid": 18195957,
            "ci": 6471,
            "imsi": "369573775632443",
            "lac": 767,
            "mcc": "262",
            "sac": null,
            "ggsn_control_plane_ip_address": "67.185.18.116",
            "mnc": "02",
            "nsapi": 5,
            "ue_ip_address": "66.185.97.229",
            "imeisv": "4555797980633712",
            "pdp_context_id": 79790039,
            "gtp_version": 1
        },
        "name": "Vodafone"
    }
}
```