Developer Reference

Flight Alerts API

View .md

External partner integration reference, version 1.1 (29 September 2026).

MK

Written by Mohd Khalid, Founding Engineer at Flyo.ai

khalid@flyo.ai

Getting Started

Ready to integrate?

Get your API key and start sending requests to the Flyo partner API.

Get your API key

Contact the Flyo team to discuss API access, pricing and your expected request volume. Once your account is enabled, use the Flyo partner dashboard to create an API key.

Fetch all legs for a flight number and departure date, subscribe to a selected departure/arrival pair, and receive flight-status changes at your HTTPS callback. Start with a partner account and an API key issued from the Flyo partner dashboard.

For production, set BASE_URL=https://prod-api.flyo.ai; for QA testing, use https://qa-api.flyo.ai. Set API_KEY to the key issued for that environment. Use these variables in the cURL examples, without a trailing slash on BASE_URL. Examples are illustrative, not verified flight schedules; replace dates with today or a future date.

MethodExternal partner endpointPurpose
GET/extPartner/api/flight-alertsGet all leg snapshots
POST/extPartner/api/flight-alerts/subscribeSubscribe to one leg

Authentication

Header
X-API-Key: flyo_<issued-key>

Authenticate requests with your active Flyo API key. Keep the key private and send it in the X-API-Key header. Use your API key for requests to Flyo; the separate callback key verifies notifications sent to your endpoint.

Get your incoming API key from the Flyo partner dashboard. Callback credentials are generated separately by the flight subscription API.

Rate Limits and Usage

API-key requests are limited to 60 per minute and 1,000 per hour, shared with other endpoints using that key. HTTP 429 includes retryAfter in seconds.

Each successful explicit status GET counts once, even if it returns several legs. Subscribe calls do not add GET usage.

Contact Flyo to confirm the usage allowance and commercial terms for your account.

Integration Sequence

  1. GET status using flight number and date.
  2. Select a leg from the returned array.
  3. Subscribe with its airports, your callback URL and your external flight ID (fid).
  4. Save the returned callback key and verify subsequent POSTs.

A direct subscription without a prior GET is also supported.

Error Format

Flight handlers normally return the JSON envelope below for failures. Authentication middleware uses human-readable error strings; do not assume every error value is an enum. Inspect HTTP status, error and message together.

Example
{
  "success": false,
  "error": "VALIDATION_ERROR",
  "message": "departureDate must be a valid YYYY-MM-DD date"
}

Common Errors

HTTP StatusMessage
400VALIDATION_ERROR: fix missing or malformed input, past date, airport code, callback URL or string fid.
401API key required / Invalid API key. Supply an active incoming X-API-Key.
404FLIGHT_NOT_FOUND: no matching flight/date, or the requested leg was not discovered. Verify the flight details.
404NOT_FOUND: active partner or required stored flight status was not found.
409AMBIGUOUS_FLIGHT: more than one matching flight exists for the same route and date. Contact support.
409EXTERNAL_FID_ALREADY_REGISTERED: use the original fid for this subscription, or omit callbackData to preserve the existing URL and fid.
409CALLBACK_ALREADY_REGISTERED: the existing subscription has another callback URL. Omit callbackData or use the original URL.
429Rate limit exceeded. Wait retryAfter seconds before retrying.
500INTERNAL_ERROR / Authentication error: unexpected server or configuration failure. Contact support; avoid tight retry loops.
502PROVIDER_UNAVAILABLE: upstream flight status could not be retrieved. Retry later.
502INVALID_PROVIDER_DATA: invalid schedule or airport data was returned upstream. Contact support.
502SUBSCRIPTION_FAILED: the upstream tracking subscription could not be confirmed. Retry the same request.

Timestamp Interpretation

Expected flight timestamp format is YYYY-MM-DD HH:mm:ss, without an offset. Existing timestamp strings are preserved; database date values are serialized to this local-clock format. Do not automatically interpret these values as UTC.

All flight times, including arrival times, use the departure airport's local time. Flyo does not apply a timezone conversion. The destination offset is metadata; do not assume arrival timestamps have been converted into destination-local time.

Webhooks

Flyo sends flight updates to your registered HTTPS callback URL. Each notification contains your fid and a changes object with updated fields. Match fid to the external flight ID supplied in callbackData.fid when subscribing.

Request to your endpoint
POST /flight-alerts
Content-Type: application/json
Authorization: flyo_cb_<generated-key>

Verify Authorization against the callbackApiKey returned at registration. It is a raw value, without Bearer. It is separate from the X-API-Key used for requests to Flyo. Flyo does not provide a separate HMAC or body-signature header.

Example payload
{
  "fid": "booking-flight-42",
  "changes": {
    "departure": {
      "gate": "B2",
      "estimatedTime": "2026-10-01 10:30:00"
    }
  }
}
FieldTypeDescription
fidstringYour external flight ID, echoed exactly from callbackData.fid. Use it to identify which flight the alert belongs to.
changesobjectNested object containing changed fields and new values. Missing fields are unchanged; explicit null clears a value.

Identifying flight updates

Send fid as a JSON string, for example "00123" or "booking-flight-42". Leading zeros are preserved. Assign a stable fid to each flight leg you subscribe to, store it in your system and use the returned fid to apply changes to the correct flight. Handle duplicate notifications.

External Flight Alerts APIs

Use these endpoints from an external system to look up every leg of a flight and subscribe a selected leg for status updates.

GET/extPartner/api/flight-alerts?flightNumber=AI202&departureDate=2026-10-01

Get Flight Status

Authentication
X-API-Key: flyo_<issued-key>

Returns HTTP 200 with a JSON array of the latest available snapshots for each available leg of the requested flight and date. A single leg still returns an array with one element. There is no success/data wrapper and no pagination.

For a multi-leg flight, an array may contain DEL → MAA and MAA → HYD. Use departure.airportIata and arrival.airportIata from the desired element in your subscribe request. Ordering is by airport codes, not guaranteed journey order.

Request

cURL
curl --get "$BASE_URL/extPartner/api/flight-alerts" \
  --header "X-API-Key: $API_KEY" \
  --data-urlencode "flightNumber=AI202" \
  --data-urlencode "departureDate=2026-10-01"

Query Parameters

FieldTypeRequiredDescription
flightNumberstringYesAirline designator followed by flight digits, e.g. AI202 or QP1407. Uppercased, with spaces and hyphens removed. Leading zeros after a two-letter airline code are removed: ai-00202 becomes AI202. The cleaned validator accepts 2-3 alphanumeric prefix characters followed by 1-4 digits.
departureDateYYYY-MM-DDYesA real calendar date, on or after today in UTC. Use the scheduled departure date for the leg, e.g. 2026-10-01. Time, timezone and shortened date formats are not accepted.

Response

Response
[
  {
    "stopover": { "airportIata": null, "city": null },
    "flightNumber": "AI202",
    "isCodeshare": 0,
    "codeshareFlightNumber": null,
    "status": "schedule",
    "airline": {
      "name": "Air India",
      "code": "AI"
    },
    "departure": {
      "airportIata": "DEL",
      "city": "Delhi",
      "terminal": "T3",
      "utcOffsetSeconds": "19800",
      "scheduledTime": "2026-10-01 10:00:00",
      "estimatedTime": "2026-10-01 10:15:00",
      "actualTime": null,
      "gate": "A1",
      "boardingStatus": "check-in"
    },
    "arrival": {
      "airportIata": "MAA",
      "city": "Chennai",
      "terminal": "T1",
      "utcOffsetSeconds": "19800",
      "scheduledTime": "2026-10-01 12:45:00",
      "estimatedTime": "2026-10-01 13:00:00",
      "actualTime": null,
      "baggageBelt": null
    }
  }
]

Returned with Content-Type: application/json and Cache-Control: no-store. This is a one-leg example; additional legs have the same shape. GET does not return subscription IDs, callback credentials, subscription flags or history. Match callbacks using your external fid.

Response Fields

FieldTypeDescription
[]array of snapshot objectsOne element per available leg. See the Snapshot Field Reference below for the full shape.
[].flightNumberstringFlight number for this leg.
[].stopoverobjectIntermediate stop airportIata and city; always present, with null or empty values when unavailable.
[].alternateInfoarray (optional)Alternate-route details when available; omitted when no details have been received.
[].statusstring | nullCurrent flight status. See Flight Status Values.
[].airlineobjectAirline name and designator.
[].departureobjectDeparture airport, terminal, gate, times and boarding status.
[].arrivalobjectArrival airport, terminal, times and baggage belt.

Errors

HTTP StatusMessage
400VALIDATION_ERROR: missing or malformed flightNumber or departureDate, or a past date.
401API key required, or the API key is invalid.
404FLIGHT_NOT_FOUND: no matching flight for the requested number and date.
409AMBIGUOUS_FLIGHT: more than one matching flight exists for the same route and date.
429Rate limit exceeded. retryAfter is returned in seconds.
502PROVIDER_UNAVAILABLE or INVALID_PROVIDER_DATA: upstream flight status could not be retrieved or was invalid.
POST/extPartner/api/flight-alerts/subscribe

Subscribe to a Flight Leg

Authentication
X-API-Key: flyo_<issued-key>

Enables tracking for one flight/date/departure/arrival combination. A prior GET is optional. Other legs are not automatically subscribed.

Do not supply auth_header, clientId or clientName for flight-alert registration. Flyo generates the callback credential and derives partner identity from authentication. This differs from check-in callback registration.

A missing requested route returns 404 FLIGHT_NOT_FOUND. Retrying the same subscription preserves the existing subscription and callback settings.

Identical retries preserve the subscription and callback credential. Omitting callbackData preserves an existing callback, and a different callback URL returns 409 CALLBACK_ALREADY_REGISTERED. A different fid on the same subscription returns 409 EXTERNAL_FID_ALREADY_REGISTERED. Omit callbackData to preserve the existing URL and fid. A polling-only subscription can later attach a callback through this external API.

No callback rotation, key-recovery or unsubscribe endpoint is currently exposed.

Request

cURL
curl --request POST \
  "$BASE_URL/extPartner/api/flight-alerts/subscribe" \
  --header "X-API-Key: $API_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '{
    "flightNumber": "AI202",
    "departureDate": "2026-10-01",
    "departureAirportIata": "DEL",
    "arrivalAirportIata": "MAA",
    "callbackData": {
      "callbackUrl": "https://partner.example.com/flight-alerts",
      "fid": "booking-flight-42"
    }
  }'
Request Body
{
  "flightNumber": "AI202",
  "departureDate": "2026-10-01",
  "departureAirportIata": "DEL",
  "arrivalAirportIata": "MAA",
  "callbackData": {
    "callbackUrl": "https://partner.example.com/flight-alerts",
    "fid": "booking-flight-42"
  }
}

Request Fields

FieldTypeRequiredDescription
flightNumberstringYesSame normalization and format as the status GET.
departureDateYYYY-MM-DDYesToday or a future date under UTC validation.
departureAirportIatastring (3 letters)YesExactly three alphabetic letters, trimmed and uppercased, e.g. DEL.
arrivalAirportIatastring (3 letters)YesExactly three alphabetic letters, trimmed and uppercased, e.g. MAA.
callbackDataobject | nullNoOmit or use null for a polling-only subscription.
callbackData.fidstringYes*Required when callbackData is supplied. Your external flight ID: non-empty, at most 255 characters. Echoed exactly; use a stable ID such as booking-flight-42.
callbackData.callbackUrlHTTPS URLYes*Public HTTPS URL. No URL credentials, IP literals, fragments or internal hostnames. Redirects are not followed during delivery. Required when callbackData is supplied.

Response

Response
{
  "success": true,
  "latest_status_snapshot": {
    "stopover": { "airportIata": null, "city": null },
    "flightNumber": "AI202",
    "isCodeshare": 0,
    "codeshareFlightNumber": null,
    "status": "schedule",
    "airline": { "name": "Air India", "code": "AI" },
    "departure": {
      "airportIata": "DEL",
      "city": "Delhi",
      "terminal": "T3",
      "utcOffsetSeconds": "19800",
      "scheduledTime": "2026-10-01 10:00:00",
      "estimatedTime": "2026-10-01 10:15:00",
      "actualTime": null,
      "gate": "A1",
      "boardingStatus": "check-in"
    },
    "arrival": {
      "airportIata": "MAA",
      "city": "Chennai",
      "terminal": "T1",
      "utcOffsetSeconds": "19800",
      "scheduledTime": "2026-10-01 12:45:00",
      "estimatedTime": "2026-10-01 13:00:00",
      "actualTime": null,
      "baggageBelt": null
    }
  },
  "callbackApiKey": "flyo_cb_<generated-key>"
}

The snapshot is the same complete leg shape described under Snapshot Field Reference.

Response Fields

FieldTypeDescription
successbooleanTrue on a successful subscription.
latest_status_snapshotobjectFull selected-leg snapshot.
callbackApiKeystringReturned only when a callback is first registered. Save securely; retries do not return it again.

Errors

HTTP StatusMessage
400VALIDATION_ERROR: missing or malformed input, past date, airport code, callback URL or string fid.
401API key required, or the API key is invalid.
404FLIGHT_NOT_FOUND: the requested route was not discovered.
409EXTERNAL_FID_ALREADY_REGISTERED: use the original fid for this subscription, or omit callbackData to preserve the existing URL and fid.
409CALLBACK_ALREADY_REGISTERED: the existing subscription has another callback URL.
429Rate limit exceeded. retryAfter is returned in seconds.
502SUBSCRIPTION_FAILED: the upstream tracking subscription could not be confirmed. Retry the same request.

Snapshot Field Reference

The same snapshot shape appears in each GET array element and in latest_status_snapshot on subscribe. The mapper preserves stored values; optional or missing values normally appear as null. Blank strings and zero values can also be present.

FieldTypeDescription
flightNumberstringFlight number for this leg.
stopoverobjectAlways contains airportIata and city.
stopover.airportIatastring | nullIntermediate stop airport IATA code. Always present; may be empty or null.
stopover.citystring | nullIntermediate stop city. Always present; may be empty or null.
alternateInfoarray (optional)Alternate-route details when available. Omitted when no details have been received.
isCodeshareinteger | null0 = non-codeshare; 1 = codeshare. Not a JSON boolean.
codeshareFlightNumberstring | nullCodeshare or actual operating-carrier flight number; may be blank if not supplied.
statusstring | nullCurrent flight status. See Flight Status Values.
airlineobjectAirline information.
airline.namestring | nullAirline name.
airline.codestring | nullAirline designator derived from flightNumber.
departureobjectDeparture information for this leg.
departure.airportIatastring | nullDeparture airport IATA code.
departure.citystring | nullDeparture city name.
departure.terminalstring | nullDeparture terminal, e.g. T3.
departure.utcOffsetSecondsstring/number | nullOrigin UTC offset in seconds, e.g. "19800".
departure.scheduledTimestring | nullScheduled departure date and time.
departure.estimatedTimestring | nullEstimated departure date and time; no prediction fallback.
departure.actualTimestring | nullActual departure date and time, when available.
departure.gatestring | nullBoarding gate.
departure.boardingStatusstring | nullBoarding or check-in state. See Boarding Status Values.
arrivalobjectArrival information for this leg.
arrival.airportIatastring | nullArrival airport IATA code.
arrival.citystring | nullArrival city name.
arrival.terminalstring | nullArrival terminal.
arrival.utcOffsetSecondsstring/number | nullDestination UTC offset, in seconds.
arrival.scheduledTimestring | nullScheduled arrival date and time.
arrival.estimatedTimestring | nullEstimated arrival date and time.
arrival.actualTimestring | nullActual arrival date and time.
arrival.baggageBeltstring | nullBaggage reclaim belt or turntable.

The stopover object always contains airportIata and city. Empty strings, whitespace and null values are preserved; absent values appear as null. Changes, including clearing a value, appear under callback changes.stopover.

Alternate Flight Information

The optional alternateInfo array provides alternate-route details, for example during a diversion. It appears in GET and subscribe snapshots when details are available; flights without alternate details omit the field. The latest known details remain in the snapshot.

Callback changes includes alternateInfo only when those details change. Replace your saved array with the received array. Omitted fields in the main changes object remain unchanged. All fields within an item are optional and may be null.

Field in alternateInfo[]Meaning
statusAlternate flight status string.
departure.city / arrival.cityDeparture or arrival location name.
departure.airport / arrival.airportDeparture or arrival airport, when available.
departure.scheduledTime / arrival.scheduledTimeScheduled time, YYYY-MM-DD HH:mm:ss.
departure.actualTime / arrival.actualTimeActual time, when available.
departure.utcOffsetSeconds / arrival.utcOffsetSecondsUTC offset in seconds, when available.
Alternate-route callback
{
  "fid": "booking-flight-42",
  "changes": {
    "alternateInfo": [
      {
        "status": "diversion",
        "departure": {
          "city": "Delhi",
          "scheduledTime": "2026-10-01 10:00:00"
        },
        "arrival": {
          "city": "Hyderabad",
          "scheduledTime": "2026-10-01 12:30:00"
        }
      }
    ]
  }
}

Boarding Status Values

Values that can appear in departure.boardingStatus.

ValueMeaning
check-inCheck-in phase.
check-in closedCheck-in has closed.
boardingBoarding is in progress.
last callFinal boarding call.
gate closedBoarding gate has closed.
web check-inWeb check-in label; may also appear when a more specific boarding state is unavailable.

Null, blank and additional values may appear. Treat flight and boarding statuses as extensible strings and provide an unknown-state fallback.

Flight Status Values

status is passed through from the upstream flight data. Match the spelling, spaces and lowercase form exactly. The descriptions are explanatory labels, not a guaranteed transition order.

ValueMeaning
scheduleScheduled flight.
delayDelayed flight.
cancelCancelled flight.
diversionFlight diversion reported.
returnFlight return reported.
departureDeparture reported.
arrivalArrival reported.
diverted flight departureDeparture of a diverted flight.
diverted flight cancelCancellation of a diverted flight.
diverted flight arrivalArrival of a diverted flight.
returned flight departureDeparture of a returned flight.
returned flight cancelCancellation of a returned flight.
returned flight arrivalArrival of a returned flight.
cancel in advanceCancellation reported in advance.
circlingCircling phase reported.
circledCircling-related status; do not infer a specific flight milestone from this value alone.
climbingClimb phase.
cruisingCruise phase.
descendingDescent phase.
landingLanding phase.

This is an open value set: the API preserves the stored upstream string, including unfamiliar values or whitespace. Do not replace schedule with scheduled, delay with delayed, or cancel with cancelled. Missing values can be null. Build an unknown-state fallback into your integration.

Before Going Live

  • Verify the status GET returns every expected leg and includes scheduledTime on both sides.
  • Subscribe to the selected airport pair with callbackData.fid and securely save callbackApiKey.
  • Verify callback Authorization and match fid to your external flight ID.
  • Apply nested changes without erasing omitted fields.
  • Test null clearing, unknown statuses and duplicate notifications.
  • Confirm each GET increments usage once for multi-leg results.
  • Verify that retries preserve your callback registration and credential.

For access, integration assistance or changes to your callback setup, contact the Flyo team. Unsubscribe and callback-key rotation are not currently available through these endpoints.