---
title: "Create new alert"
method: POST
path: "/alerts"
tags: ["alerts"]
---

# Create new alert

`POST /alerts`

## Request

- Base URL: `https://aeroapi.flightaware.com/aeroapi`
- URL: `https://aeroapi.flightaware.com/aeroapi/alerts`
- Auth: API key in header `x-apikey`
- TypeScript: <https://skmtc.dev/flightaware/apis/aeroapi/docs/alerts/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new AeroAPI flight alert. When the alert is triggered, a
callback mechanism will be used to notify the address set via the
/alerts/endpoint endpoint. Each callback will be charged as a query and
count towards usage for the AeroAPI key that created the alert. If this key
is disabled or removed, the alert will no longer be available.
If a target_url is provided, then this specific alert will be delivered
to that address regardless of the adress set via the /alerts/endpoint endpoint.

## Request body

- object
  - `ident` string, nullable, required: Ident to alert on. This value may be modified based on codeshare resolution. If that occurs, the originally provided ident will be preserved in the user_ident field.
  - `origin` string, nullable, required: Origin airport ICAO, IATA, or LID code to alert on.
  - `destination` string, nullable, required: Destination airport ICAO, IATA, or LID code to alert on.
  - `aircraft_type` string, nullable, required: Aircraft type ICAO code to alert on.
  - `start` string, date, nullable, required: Start date of alert. Should be in departure airport's timezone.
  - `end` string, date, nullable, required: End date of alert (inclusive). Should be in departure airport's timezone.
  - `max_weekly` integer: Reject the new alert if the estimated number of triggered alerts per week based on historical flight trends would exceed this value. The threshold only considers alerts triggered by this alert config (it is not a total for all previously configured alerts). Check is only applied at alert creation/modification, and does and does not prevent alerts from being delivered even if they exceed the given amount. If your alert request is rejected, consider adding additional filter criteria for the alert creation to further refine the config. If max_weekly is not specified for a standard customer, we default the max_weekly to 1000. For a premium customer, we default the max_weekly to 4000.
  - `eta` integer, required: How many minutes before a flight's ETA that an alert should be delivered. Alerts will only be delivered after the flight has been in the air for at least 15 minutes. Set to 0 to disable.
  - `events` object, required
    - `arrival` boolean, required: Whether alerts should be delivered on arrival. FlightAware Global customers will also receive \"taxi stop\" Ready To Taxi™ alerts unless they've opted out.
    - `cancelled` boolean, required: Whether alerts should be delivered on cancellation by the airline
    - `departure` boolean, required: Whether alerts should be delivered on departure. FlightAware Global customers will also receive \"power on\" and \"taxi start\" Ready To Taxi™ alerts unless they've opted out.
    - `diverted` boolean, required: Whether alerts should be delivered on diversion
    - `filed` boolean, required: Whether alerts should be delivered on filing
    - `out` boolean, required: Whether alerts should be delivered when aircraft leaves departure gate
    - `off` boolean, required: Whether alerts should be delivered when aircraft leaves the runway
    - `on` boolean, required: Whether alerts should be delivered when aircraft touches down on runway
    - `in` boolean, required: Whether alerts should be delivered when aircraft enters arrival gate
  - `target_url` string, nullable, required: Alert specific URL to deliver to. If null, then the alert will be delivered to the configured account-wide alert URL target.

## Response `201`

Alert created successfully

## Other responses

- `400`: Invalid parameters specified (invalid ident, origin, destination, aircraft_type, dates or missing events) or alert configured would trigger more than max_weekly delivered alerts per week.

---

[API](https://skmtc.dev/flightaware/apis/aeroapi.md) - [All operations](https://skmtc.dev/flightaware/apis/aeroapi/llms.txt) - [OpenAPI document](https://skmtc.dev/flightaware/apis/aeroapi/revisions/3023e7a0c54c?raw)
