# list_flight_versions
> List the version history of a Flight, newest first.
List every immutable version of a [Flight](/concepts/flights), newest first. Each update to `source_code`, `requirements_txt`, `config`, `md_token_name`, or `md_secret_names` produces a fresh version. Updates to `name` or `schedule_cron` are metadata-only and do not appear here.

## Description

Use `list_flight_versions` to browse what changed between versions, or to find the version a specific run executed. The corresponding SQL function is [`MD_FLIGHT_VERSIONS`](/sql-reference/motherduck-sql-reference/flights/md-flight-versions).

## Input parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string (UUID) | Yes | The Flight UUID. |
| `limit` | integer | No | Max results to return (default: 100, max: 500). |

## Output schema

```json
{
  "success": boolean,
  "versions": [
    {
      "version": number,
      "source_code": string,
      "requirements_txt": string,
      "md_token_name": string,
      "md_secret_names": string[],
      "config": { "<key>": "<value>" },
      "created_at": string
    }
  ],
  "count": number,
  "error": string
}
```

## Example usage

```json
{ "id": "80000000-0000-0000-0000-000000000001" }
```

## Related

- [`get_flight`](../get-flight) — Fetch one version's full content.
- [`list_flight_runs`](../list-flight-runs) — Runs reference the version they used.
- [`MD_FLIGHT_VERSIONS`](/sql-reference/motherduck-sql-reference/flights/md-flight-versions) — SQL equivalent.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/sql-reference/mcp/list-flight-versions/",
  "page_title": "list_flight_versions",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
