> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.iklim.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Thunderstorm Notification

> Polygon-based thunderstorm lifecycle payload with severity, timing, and lightning cell analytics.

<CardGroup cols={3}>
  <Card title="⛈️ Multi-minute awareness" icon="stopwatch">
    Describes the full thunderstorm window (start, end, severity) so you can orchestrate escalations minutes in advance.
  </Card>

  <Card title="🌀 Polygon intelligence" icon="draw-polygon">
    Includes the exact exterior ring that intersects your registration, enabling map overlays out of the box.
  </Card>

  <Card title="📡 Lightning fused" icon="bolt">
    Cell metrics expose flash rates, direction, and motion derived from real-time lightning telemetry.
  </Card>
</CardGroup>

<Tabs>
  <Tab title="Sample payload 💾" icon="code">
    ```json theme={null}
    {
      "thunderstormId": "692d5b2cf4142f722546d77a",
      "eventId": "EAF202512010907001",
      "registrationId": "e71fedf8-a0a9-462e-a972-47dc8a5586df",
      "recipientId": "recipient-04c2b9c7ad01",
      "eventStartUtc": 1764580080,
      "eventEndUtc": 1764582780,
      "severity": "LOW",
      "threshold": 3,
      "speedKmh": 38.892,
      "distance": 0,
      "affectedPolygon": {
        "exterior": [
          { "lng": 28.943784, "lat": 40.979168 },
          { "lng": 28.943784, "lat": 41.051032 },
          { "lng": 29.015216, "lat": 41.051032 },
          { "lng": 29.015216, "lat": 40.979168 },
          { "lng": 28.943784, "lat": 40.979168 }
        ],
        "holes": []
      },
      "cell": {
        "area": 8.999704133858742,
        "speedKmh": 33.293898860271185,
        "direction": 255,
        "distance": null,
        "centroid": {
          "lng": 28.9795,
          "lat": 41.0151
        },
        "polygon": {
          "exterior": [
            { "lng": 28.961642, "lat": 41.0151 },
            { "lng": 28.970571, "lat": 41.033066 },
            { "lng": 28.988429, "lat": 41.033066 },
            { "lng": 28.997358, "lat": 41.0151 },
            { "lng": 28.988429, "lat": 40.997134 },
            { "lng": 28.970571, "lat": 40.997134 },
            { "lng": 28.961642, "lat": 41.0151 }
          ],
          "holes": []
        },
        "flashRates": {
          "inCloud": 4.33,
          "cloudToGround": 0.34,
          "total": 4.67
        }
      }
    }
    ```
  </Tab>

  <Tab title="Event metadata 🗂️" icon="circle-info">
    | Field            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                           |
    | ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `thunderstormId` | string | Unique ID for this thunderstorm instance; use it to correlate updates.                                                                                                                                                                                                                                                                                                                |
    | `eventId`        | string | Business-friendly identifier that aligns with the iklim.co event catalog.                                                                                                                                                                                                                                                                                                             |
    | `registrationId` | string | Subscription/registration that subscribed to the thunderstorm product.                                                                                                                                                                                                                                                                                                                |
    | `recipientId`    | string | Caller-defined identifier that maps the notification back to your customer/asset record (feel free to use hashed/anonymized unique IDs instead of human labels for GDPR compliance); keep it unique per geometry because only one registration is allowed for the same area per `recipientId`, and use it when you prefer to locate your target without storing our `registrationId`. |
    | `eventStartUtc`  | number | UTC epoch seconds for when the storm will enter the protected area.                                                                                                                                                                                                                                                                                                                   |
    | `eventEndUtc`    | number | UTC epoch seconds for when the storm is expected to leave the area.                                                                                                                                                                                                                                                                                                                   |
    | `severity`       | enum   | Discrete bucket such as `LOW`, `MEDIUM`, or `HIGH` based on flash density and speed.                                                                                                                                                                                                                                                                                                  |
    | `threshold`      | number | Minimum lightning flash count per minute that qualifies the cluster as a thunderstorm.                                                                                                                                                                                                                                                                                                |
    | `speedKmh`       | number | Forecasted forward speed of the whole thunderstorm envelope in km/h—pair it with `direction` to project the track.                                                                                                                                                                                                                                                                    |
    | `direction`      | number | Bearing in degrees (0° = North, clockwise) that shows where the envelope described by `speedKmh` is heading.                                                                                                                                                                                                                                                                          |
    | `distance`       | number | Meters between the storm edge and your registration centroid (`0` when currently overhead).                                                                                                                                                                                                                                                                                           |

    #### `ThunderstormSeverity` catalog

    | Value    | Meaning                                                                                               |
    | -------- | ----------------------------------------------------------------------------------------------------- |
    | `LOW`    | Sporadic flashes with limited coverage; treat as FYI or low-touch workflows.                          |
    | `MEDIUM` | Sustained lightning clusters capable of causing localized damage; escalate to mid-tier playbooks.     |
    | `HIGH`   | Widespread, fast-moving cells with extreme flash rates; trigger your highest alert level immediately. |
  </Tab>

  <Tab title="Geospatial + cell data 🧭" icon="earth-europe">
    #### `affectedPolygon`

    | Field                        | Type            | Description                                                                              |
    | ---------------------------- | --------------- | ---------------------------------------------------------------------------------------- |
    | `affectedPolygon.exterior[]` | `array<LngLat>` | Clockwise list of longitude/latitude vertices that intersect your registration boundary. |
    | `affectedPolygon.holes[]`    | `array<LngLat>` | Optional voids to subtract (usually empty).                                              |

    #### `cell`

    | Field                           | Type            | Description                                                                                                                      |
    | ------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
    | `cell.area`                     | number          | Cell area in square kilometers.                                                                                                  |
    | `cell.speedKmh`                 | number          | Speed of the most active lightning cell (km/h); use with `cell.direction` to see how quickly the core is approaching or leaving. |
    | `cell.direction`                | number          | Movement bearing in degrees (0° = North, clockwise) aligned with `cell.speedKmh`, highlighting the lightning core's heading.     |
    | `cell.distance`                 | number/null     | Kilometers from the cell centroid to the registered asset; `null` when it overlaps.                                              |
    | `cell.centroid.lng`             | number          | Longitude of the lightning cell centroid.                                                                                        |
    | `cell.centroid.lat`             | number          | Latitude of the lightning cell centroid.                                                                                         |
    | `cell.polygon.exterior[]`       | `array<LngLat>` | High-resolution outline of the most energetic cell.                                                                              |
    | `cell.polygon.holes[]`          | `array<LngLat>` | Optional interior voids for the cell polygon.                                                                                    |
    | `cell.flashRates.inCloud`       | number          | In-cloud flashes per minute.                                                                                                     |
    | `cell.flashRates.cloudToGround` | number          | Cloud-to-ground flashes per minute.                                                                                              |
    | `cell.flashRates.total`         | number          | Sum of all flash types per minute.                                                                                               |
  </Tab>
</Tabs>

<Steps>
  <Step title="Decode the time window 🕒">
    Convert `eventStartUtc`/`eventEndUtc` to your user's timezone and show a friendly countdown in customer apps.
  </Step>

  <Step title="Render polygons on the map 🗺️">
    Overlay `affectedPolygon` + `cell.polygon` on your GIS layer to highlight precisely where the danger lies.
  </Step>

  <Step title="Automate escalations 🚨">
    When `severity` ≥ `MEDIUM` and `distance` ≤ 5 km, automatically notify high-value customers or halt risky operations.
  </Step>
</Steps>
