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

# Create Flight

> Schedule a new flight for the workspace

Schedule a new flight. When omitting airline, aircraft, airport, or ticket class details, the API automatically resolves and populates them using your workspace flight settings.

## Request

```bash theme={null}
curl -X POST "https://api.series.hr/flights/create" \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "FlightNumber": "RA 101",
    "OriginAirportId": "apt_1",
    "OriginGateId": "gate_1",
    "DestinationAirportId": "apt_2",
    "DestinationGateId": "gate_5",
    "AirlineId": "airline_1",
    "AircraftId": "ac_1",
    "ScheduledDepartureTime": "2026-09-01T14:00:00.000Z",
    "DurationRealMinutes": 45,
    "DurationGameplayMinutes": 15
  }'
```

## Parameters

<ParamField body="FlightNumber" type="string" required>
  The flight number identifier (e.g. `RA 101`).
</ParamField>

<ParamField body="OriginAirportId" type="string" required>
  ID of the departure airport.
</ParamField>

<ParamField body="DestinationAirportId" type="string" required>
  ID of the arrival airport.
</ParamField>

<ParamField body="OriginGateId" type="string">
  Departure gate ID.
</ParamField>

<ParamField body="DestinationGateId" type="string">
  Arrival gate ID.
</ParamField>

<ParamField body="AirlineId" type="string">
  Airline ID configured in workspace settings.
</ParamField>

<ParamField body="AircraftId" type="string">
  Fleet aircraft type ID configured in workspace settings.
</ParamField>

<ParamField body="ScheduledDepartureTime" type="string">
  ISO 8601 timestamp for scheduled departure (defaults to current time if omitted).
</ParamField>

<ParamField body="ScheduledArrivalTime" type="string">
  ISO 8601 timestamp for scheduled arrival (calculated from duration if omitted).
</ParamField>

<ParamField body="DurationRealMinutes" type="integer" default="45">
  Duration of the flight in real-world minutes.
</ParamField>

<ParamField body="DurationGameplayMinutes" type="integer" default="15">
  In-game scaled gameplay duration in minutes.
</ParamField>

<ParamField body="Classes" type="array">
  Custom ticket class allocations. If omitted, uses default ticket classes from workspace settings.
</ParamField>

## Response

<ResponseField status={200} name="200">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "Message": "Flight created successfully",
      "Flight": {
        "FlightId": "flt_1740000000000_abcde",
        "WorkspaceId": "a7d5339a-5531-4336-99c6-6f3249c9ac20",
        "FlightNumber": "RA 101",
        "AirlineName": "Roblox Airways",
        "OriginAirportName": "Robloxia International",
        "DestinationAirportName": "Blox City Airport",
        "ScheduledDepartureTime": "2026-09-01T14:00:00.000Z",
        "ScheduledArrivalTime": "2026-09-01T14:45:00.000Z",
        "Status": "scheduled",
        "TotalAllocatedSeats": 180,
        "CreatedAt": "2026-09-01T10:00:00.000Z"
      }
    }
  }
  ```
</ResponseField>

## Status Codes

* `200`: Flight created successfully
* `400`: Invalid parameters (e.g. same origin and destination)
* `401`: API key is required
* `403`: Flights module is disabled
