> For the complete documentation index, see [llms.txt](https://docs.aviowiki.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aviowiki.com/webhooks/payload-format.md).

# Payload format

All webhook deliveries are HTTP POST requests with a JSON body. There are two event categories:

### Data Change Events

Triggered when a contribution (create, update, or delete) is merged for any of the non-flight event types.

```json
{
  "event": "DATA_CHANGE",
  "timestamp": "2026-05-15T14:30:00",
  "data": {
    "type": "AIRPORT",
    "aid": "APTxxxxxxxx",
    "action": "CREATE",
    "url": "https://api.aviowiki.com/airports/APTxxxxxxxx"
  }
}
```

| Field         | Description                                    |
| ------------- | ---------------------------------------------- |
| `event`       | Always `DATA_CHANGE` for non-flight events     |
| `timestamp`   | When the event occurred (ISO 8601)             |
| `data.type`   | The event type matching your subscription      |
| `data.aid`    | The aviowiki identifier of the affected entity |
| `data.action` | One of `CREATE`, `UPDATE`, or `DELETE`         |
| `data.url`    | Direct API link to fetch the full entity       |

Use the `data.url` to retrieve the complete, up-to-date entity from the API.

### Flight Update Events

Triggered when a tracked aircraft changes state.

```json
{
  "event": "FLIGHT_UPDATE",
  "timestamp": "2026-05-15T14:30:00",
  "data": {
    "type": "FLIGHT",
    "id": "12345",
    "action": "TAKE_OFF",
    "url": "https://api.aviowiki.com/flights/12345",
    "parent": {
      "aid": "ACFxxxxxxxx",
      "registration": "DABCD"
    }
  }
}
```

| Field                      | Description                              |
| -------------------------- | ---------------------------------------- |
| `event`                    | Always `FLIGHT_UPDATE` for flight events |
| `data.id`                  | The flight identifier                    |
| `data.action`              | The flight event action (see below)      |
| `data.url`                 | Direct API link to fetch the full flight |
| `data.parent.aid`          | The aircraft's aviowiki identifier       |
| `data.parent.registration` | The aircraft registration (tail number)  |

**Flight Actions:**

| Action               | Description                              |
| -------------------- | ---------------------------------------- |
| `OFF_BLOCK`          | Aircraft has pushed back from the gate   |
| `ON_BLOCK`           | Aircraft has arrived at the gate         |
| `TAKE_OFF`           | Aircraft has taken off                   |
| `LANDING`            | Aircraft has landed                      |
| `APPROACH`           | Aircraft is on approach                  |
| `OFF_ROUTE`          | Aircraft has deviated from planned route |
| `RETURN_TO_STAND`    | Aircraft is returning to the stand       |
| `INITIATE_EMERGENCY` | Emergency declared                       |
| `END_EMERGENCY`      | Emergency cancelled                      |
| `DIVERSION`          | Aircraft is diverting to another airport |
