Skip to main content

Get Upcoming Flights

Returns all upcoming flights for the authenticated airline that haven’t ended yet, including brand information.

Headers

x-api-key
string
required
Your airline’s API token

Response

Returns an array of flight objects with embedded brand information:
id
uuid
Unique identifier for the flight
code
string
Flight code (e.g., “ST123”)
gameId
string
ROBLOX game/place ID for the flight
aircraft
string
Aircraft type (e.g., “Boeing 737-800”)
airlineId
string
ID of the operating airline
brandId
string
ID of the operating brand
startTime
timestamp
Scheduled start time for the flight
endTime
timestamp
When the flight ended (null for upcoming flights)
codeshareAirlineId
string
ID of codeshare partner airline (if applicable)
departure
string
Departure airport code
arrival
string
Arrival airport code
startedAt
timestamp
When the flight actually started (null if not started)
Discord event link for the flight
brand
object
Brand information object with fields: brandId, airlineId, name, iata, icao, callsign, isPrimary, logoUrl, accentColor, secondaryColor, elementColor

Example Request

curl -X GET https://api.skyteam.dev/flight/fetchUpcomingFlights \
  -H "x-api-key: your_api_key_here"

Example Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "code": "ST123",
    "gameId": "1234567890",
    "aircraft": "Boeing 737-800",
    "airlineId": "skyteam",
    "brandId": "skyteam-main",
    "startTime": "2024-03-15T14:00:00.000Z",
    "endTime": null,
    "codeshareAirlineId": null,
    "departure": "KJFK",
    "arrival": "KLAX",
    "startedAt": null,
    "discordEventLink": "https://discord.gg/event/123456",
    "brand": {
      "brandId": "skyteam-main",
      "airlineId": "skyteam",
      "name": "SkyTeam Airways",
      "iata": "ST",
      "icao": "SKT",
      "callsign": "SKYTEAM",
      "isPrimary": true,
      "logoUrl": "https://files.skyteam.dev/api/public/dl/kiLB84P2?inline=true",
      "accentColor": "#2ea5f7",
      "secondaryColor": "#242429",
      "elementColor": "#fbfbfb"
    }
  }
]

Start Flight

Marks a flight as started by setting the startedAt timestamp.

Headers

x-api-key
string
required
Your airline’s API token

Path Parameters

id
uuid
required
The unique identifier of the flight to start

Response

Returns the updated flight object with startedAt set to the current timestamp.

Example Request

curl -X POST https://api.skyteam.dev/flight/550e8400-e29b-41d4-a716-446655440000/serverStart \
  -H "x-api-key: your_api_key_here"

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "code": "ST123",
  "gameId": "1234567890",
  "aircraft": "Boeing 737-800",
  "airlineId": "skyteam",
  "brandId": "skyteam-main",
  "startTime": "2024-03-15T14:00:00.000Z",
  "endTime": null,
  "codeshareAirlineId": null,
  "departure": "KJFK",
  "arrival": "KLAX",
  "startedAt": "2024-03-15T14:05:23.456Z",
  "discordEventLink": "https://discord.gg/event/123456"
}

Error Response

Status: 404 Not Found
{
  "error": "Flight not found"
}

Flight Heartbeat

Sends a heartbeat signal to indicate the flight server is still active. Currently acknowledges receipt without persisting data (schema lacks lastPingAt field).

Headers

x-api-key
string
required
Your airline’s API token

Path Parameters

id
uuid
required
The unique identifier of the flight

Response

ok
boolean
Always true
flightId
uuid
The flight ID that was pinged
message
string
Confirmation message

Example Request

curl -X POST https://api.skyteam.dev/flight/550e8400-e29b-41d4-a716-446655440000/tick \
  -H "x-api-key: your_api_key_here"

Example Response

{
  "ok": true,
  "flightId": "550e8400-e29b-41d4-a716-446655440000",
  "message": "tick received"
}
This endpoint is a placeholder for future functionality where the server will track flight health and auto-end stale flights.

End Flight

Marks a flight as completed by setting the endTime timestamp.

Headers

x-api-key
string
required
Your airline’s API token

Path Parameters

id
uuid
required
The unique identifier of the flight to end

Response

Returns the updated flight object with endTime set to the current timestamp.

Example Request

curl -X POST https://api.skyteam.dev/flight/550e8400-e29b-41d4-a716-446655440000/serverEnd \
  -H "x-api-key: your_api_key_here"

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "code": "ST123",
  "gameId": "1234567890",
  "aircraft": "Boeing 737-800",
  "airlineId": "skyteam",
  "brandId": "skyteam-main",
  "startTime": "2024-03-15T14:00:00.000Z",
  "endTime": "2024-03-15T16:30:00.000Z",
  "codeshareAirlineId": null,
  "departure": "KJFK",
  "arrival": "KLAX",
  "startedAt": "2024-03-15T14:05:23.456Z",
  "discordEventLink": "https://discord.gg/event/123456"
}

Error Response

Status: 404 Not Found
{
  "error": "Flight not found"
}

Build docs developers (and LLMs) love