{
  "openapi": "3.1.0",
  "info": {
    "title": "Open Fly Agent API",
    "version": "v1",
    "description": "Public REST reads and read-only agent actions. The production flight list was empty on 25 November 2026. Read `GET /api/v1/flights` for current published inventory. Card payments are currently unavailable on production.\n\nTravelers can submit a route to the review queue without signing in via `POST /api/v1/proposals` with `originCode` and `destCode`. Queue submissions have no alerts. For matching in-app alerts, use a traveler Bearer session to call `POST /api/v1/saved-searches/demands` with `origin`, `destination`, `departure` (YYYY-MM-DD), `trip: \"oneway\"` and `notify: true`. The same session can read requests and alerts at `GET /api/v1/saved-searches/demands` and `GET /api/v1/saved-searches/alerts`. A traveler-scoped agent token can read saved searches through `list_saved_searches`."
  },
  "servers": [
    {
      "url": "/api/v1",
      "description": "https://openfly.fun (production) or https://dev.openfly.fun (development). Resolve relative links against the host serving this document."
    }
  ],
  "externalDocs": {
    "description": "Agent guide",
    "url": "/AGENTS.md"
  },
  "paths": {
    "/agent/actions": {
      "get": {
        "operationId": "get_agent_actions",
        "summary": "Read the action registry",
        "responses": {
          "200": {
            "description": "Version and contracts keyed by action name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "version": {
                      "type": "string"
                    },
                    "actions": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "ok",
                    "version",
                    "actions"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "get_api_health",
        "summary": "Check API and database health",
        "responses": {
          "200": {
            "description": "Database reachable."
          },
          "503": {
            "description": "Database unavailable."
          }
        }
      }
    },
    "/flights": {
      "get": {
        "summary": "List published flights",
        "security": [],
        "responses": {
          "200": {
            "description": "List published flights",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "flights": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "originCode": {
                            "type": "string"
                          },
                          "destCode": {
                            "type": "string"
                          },
                          "date": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "price": {
                            "type": "integer"
                          },
                          "listingType": {
                            "enum": [
                              "charter",
                              "empty_leg"
                            ]
                          },
                          "published": {
                            "type": "boolean"
                          },
                          "availableSeats": {
                            "type": "integer"
                          },
                          "aircraftType": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "originCode",
                          "destCode",
                          "date",
                          "time",
                          "price",
                          "listingType",
                          "published",
                          "availableSeats",
                          "aircraftType"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "flights"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/flights/{id}": {
      "get": {
        "summary": "Read a published flight",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read a published flight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "flight": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "originCode": {
                          "type": "string"
                        },
                        "destCode": {
                          "type": "string"
                        },
                        "date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "time": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "price": {
                          "type": "integer"
                        },
                        "listingType": {
                          "enum": [
                            "charter",
                            "empty_leg"
                          ]
                        },
                        "published": {
                          "type": "boolean"
                        },
                        "availableSeats": {
                          "type": "integer"
                        },
                        "aircraftType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "originCode",
                        "destCode",
                        "date",
                        "time",
                        "price",
                        "listingType",
                        "published",
                        "availableSeats",
                        "aircraftType"
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "flight"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No matching public record."
          }
        }
      }
    },
    "/acmi/aircraft": {
      "get": {
        "summary": "List ACMI aircraft",
        "security": [],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First day of the window. Supply with to."
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last day of the window. Supply with from."
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "airport",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "privateOnly",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bookingAvailability",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minSeats",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "maxSeats",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List ACMI aircraft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "aircraft": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "aircraftType": {
                            "type": "string"
                          },
                          "seats": {
                            "type": "integer"
                          },
                          "bookable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "aircraftType",
                          "seats"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "aircraft",
                    "page",
                    "limit",
                    "total",
                    "regions"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/acmi/aircraft/{id}": {
      "get": {
        "summary": "Read ACMI aircraft details",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First day of the window. Supply with to."
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last day of the window. Supply with from."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read ACMI aircraft details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "aircraft": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "aircraftType": {
                          "type": "string"
                        },
                        "seats": {
                          "type": "integer"
                        },
                        "bookable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "aircraftType",
                        "seats"
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "aircraft"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No matching public record."
          }
        }
      }
    },
    "/jobs": {
      "get": {
        "summary": "List published pilot jobs. Records with isExample=true are examples.",
        "security": [],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rank",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authority",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contract",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aircraftType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "salaryCurrency",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "salaryPeriod",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minHours",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "posted",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "salaryMin",
            "in": "query",
            "schema": {
              "type": "number",
              "description": "Supply with salaryCurrency and salaryPeriod."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List published pilot jobs. Records with isExample=true are examples.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "company_name": {
                            "type": "string"
                          },
                          "isExample": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "company_name",
                          "isExample"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "operator": {
                      "type": "string"
                    },
                    "operatorName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "jobs",
                    "page",
                    "limit",
                    "total"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{id}": {
      "get": {
        "summary": "Read a published pilot job",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read a published pilot job",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "job": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string"
                        },
                        "company_name": {
                          "type": "string"
                        },
                        "isExample": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "company_name",
                        "isExample"
                      ]
                    },
                    "jsonLd": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "ok",
                    "job",
                    "jsonLd"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No matching public record."
          }
        }
      }
    },
    "/brokers": {
      "get": {
        "summary": "List published crew brokers",
        "security": [],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contract",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "licence",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "verified",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rank",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "availableNow",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List published crew brokers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "brokers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "slug",
                          "name"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "ok",
                    "brokers",
                    "page",
                    "limit",
                    "total"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/brokers/{slug}": {
      "get": {
        "summary": "Read a crew broker and its published jobs",
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read a crew broker and its published jobs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "broker": {
                      "type": "object",
                      "properties": {
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "slug",
                        "name"
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "company_name": {
                            "type": "string"
                          },
                          "isExample": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "company_name",
                          "isExample"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "broker",
                    "jobs"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No matching public record."
          }
        }
      }
    },
    "/companies": {
      "get": {
        "summary": "List published company pages",
        "security": [],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List published company pages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "companies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "slug",
                          "name"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "ok",
                    "companies",
                    "page",
                    "limit",
                    "total"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/companies/{slug}": {
      "get": {
        "summary": "Read a company page and its published jobs",
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read a company page and its published jobs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "company": {
                      "type": "object",
                      "properties": {
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "slug",
                        "name"
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "company_name": {
                            "type": "string"
                          },
                          "isExample": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "company_name",
                          "isExample"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "company",
                    "jobs"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No matching public record."
          }
        }
      }
    },
    "/airports": {
      "get": {
        "summary": "Read the airport catalogue",
        "security": [],
        "responses": {
          "200": {
            "description": "Read the airport catalogue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "airports": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "lat": {
                            "type": "number"
                          },
                          "lon": {
                            "type": "number"
                          },
                          "tz": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "name",
                          "city",
                          "country",
                          "lat",
                          "lon",
                          "tz"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "airports"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/airports/search": {
      "get": {
        "summary": "Search the airport catalogue",
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30,
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search the airport catalogue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "airports": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "lat": {
                            "type": "number"
                          },
                          "lon": {
                            "type": "number"
                          },
                          "tz": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "name",
                          "city",
                          "country",
                          "lat",
                          "lon",
                          "tz"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "airports"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/founders": {
      "get": {
        "summary": "Read public Founders records and programme status",
        "security": [],
        "responses": {
          "200": {
            "description": "Read public Founders records and programme status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "founders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "slug",
                          "role"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "taken": {
                      "type": "integer"
                    },
                    "remaining": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "sold_out": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "enabled",
                    "founders"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/operator-listings": {
      "get": {
        "summary": "Find unclaimed operator or ACMI listings",
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listing",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Exact ID, slug, IATA or ICAO code. Takes precedence over q."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Find unclaimed operator or ACMI listings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "listings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "domain": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "claimUrl": {
                            "type": "string"
                          },
                          "verificationRequired": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "name",
                          "domain",
                          "claimUrl",
                          "verificationRequired"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "listings"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/agent/actions/search_flights": {
      "post": {
        "operationId": "search_flights",
        "summary": "Search flights",
        "description": "Search published passenger flights by route, date window and price.",
        "x-scope": null,
        "x-backing-route": "GET /api/v1/flights",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "origin": {
                    "type": "string",
                    "pattern": "^[A-Za-z]{3}$",
                    "description": "IATA origin code"
                  },
                  "dest": {
                    "type": "string",
                    "pattern": "^[A-Za-z]{3}$",
                    "description": "IATA destination code"
                  },
                  "dateFrom": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                  },
                  "dateTo": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                  },
                  "maxPrice": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "flights"
                  ],
                  "properties": {
                    "flights": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/quote_price": {
      "post": {
        "operationId": "quote_price",
        "summary": "Quote price",
        "description": "Quote a published passenger flight using public pricing.",
        "x-scope": null,
        "x-backing-route": "POST /api/v1/pricing/quote",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "flightId"
                ],
                "properties": {
                  "flightId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,32}$"
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6,
                    "default": 1
                  },
                  "baggage": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "boolean"
                  },
                  "saf": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "quote"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "quote": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_acmi_aircraft": {
      "post": {
        "operationId": "list_acmi_aircraft",
        "summary": "List ACMI aircraft",
        "description": "List active ACMI aircraft with pricing terms and maintenance status.",
        "x-scope": null,
        "x-backing-route": "GET /api/v1/acmi/aircraft",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "type": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "airport": {
                    "type": "string",
                    "pattern": "^[A-Za-z]{3,4}$"
                  },
                  "minSeats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 900
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "aircraft",
                    "total"
                  ],
                  "properties": {
                    "aircraft": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_jobs": {
      "post": {
        "operationId": "list_jobs",
        "summary": "List pilot jobs",
        "description": "List published pilot jobs by keyword, rank and page size.",
        "x-scope": null,
        "x-backing-route": "GET /api/v1/jobs",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "q": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "rank": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "jobs",
                    "total"
                  ],
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_brokers": {
      "post": {
        "operationId": "list_brokers",
        "summary": "List crew brokers",
        "description": "List published crew brokers in the public directory.",
        "x-scope": null,
        "x-backing-route": "GET /api/v1/brokers",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "q": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "brokers",
                    "total"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "brokers": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_saved_searches": {
      "post": {
        "operationId": "list_saved_searches",
        "summary": "List saved searches",
        "description": "List the signed-in traveler's saved flight searches.",
        "x-scope": "traveler:read",
        "x-backing-route": "GET /api/v1/saved-searches",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "searches",
                    "total"
                  ],
                  "properties": {
                    "searches": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/update_saved_search": {
      "post": {
        "operationId": "update_saved_search",
        "summary": "Update saved route watch",
        "description": "Replace the confirmed criteria of a route watch owned by the authenticated traveler. Use the watch ID and revision from GET /api/v1/route-watches.",
        "x-scope": "traveler:write",
        "x-backing-route": "PATCH /api/v1/route-watches/{id}",
        "x-risk": "medium",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "watch_id",
                  "revision",
                  "confirm",
                  "idempotency_key",
                  "criteria"
                ],
                "properties": {
                  "watch_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  },
                  "idempotency_key": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,128}$"
                  },
                  "criteria": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "query",
                      "budget_minor"
                    ],
                    "properties": {
                      "query": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "origin",
                          "destination",
                          "departure",
                          "trip",
                          "adults",
                          "children",
                          "infants",
                          "cabin",
                          "currency"
                        ],
                        "properties": {
                          "origin": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{3}$"
                          },
                          "destination": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{3}$"
                          },
                          "departure": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "trip": {
                            "type": "string",
                            "pattern": "^(oneway|return)$"
                          },
                          "return_date": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "adults": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 6
                          },
                          "children": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 6
                          },
                          "infants": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 6
                          },
                          "cabin": {
                            "type": "string",
                            "pattern": "^(economy|premium_economy|business|first)$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^(EUR|GBP|USD|JPY|KWD)$"
                          },
                          "sort": {
                            "type": "string",
                            "pattern": "^(cheapest|fastest|best)$"
                          },
                          "stops": {
                            "type": "string",
                            "pattern": "^(all|0|1)$"
                          },
                          "airline": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "time_from": {
                            "type": "string",
                            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                          },
                          "time_to": {
                            "type": "string",
                            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                          }
                        }
                      },
                      "budget_minor": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "ok",
                    "watch"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "watch": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "revision",
                        "criteria",
                        "status",
                        "last_check",
                        "expires_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{32}$"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4294967295
                        },
                        "criteria": {
                          "type": "object"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "saved",
                            "watching",
                            "paused",
                            "expired",
                            "delayed"
                          ]
                        },
                        "last_check": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expires_at": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_missions": {
      "post": {
        "operationId": "list_missions",
        "summary": "List missions",
        "description": "List the signed-in traveler's missions, newest first, with state, outcome and next action. Results are research or offers; no booking is ever made.",
        "x-scope": "traveler:read",
        "x-backing-route": "GET /api/v1/missions",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "missions",
                    "next_cursor"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "missions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "type",
                          "state",
                          "outcome_kind",
                          "revision",
                          "next_action"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{32}$"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "trip",
                              "recurring_trip",
                              "aircraft_sourcing"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "ready",
                              "running",
                              "waiting_for_event",
                              "waiting_for_authorization",
                              "completed",
                              "failed",
                              "cancelled",
                              "expired"
                            ]
                          },
                          "outcome_kind": {
                            "type": "string",
                            "enum": [
                              "none",
                              "research",
                              "offer_found",
                              "booking_confirmed"
                            ]
                          },
                          "revision": {
                            "type": "integer"
                          },
                          "next_action": {
                            "type": [
                              "object",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/get_mission": {
      "post": {
        "operationId": "get_mission",
        "summary": "Get mission",
        "description": "Read one owned mission with its steps, linked records, events, transition history and result source and freshness.",
        "x-scope": "traveler:read",
        "x-backing-route": "GET /api/v1/missions/{id}",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "mission_id"
                ],
                "properties": {
                  "mission_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "mission"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "mission": {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "state",
                        "outcome_kind",
                        "revision",
                        "next_action"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{32}$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "trip",
                            "recurring_trip",
                            "aircraft_sourcing"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "ready",
                            "running",
                            "waiting_for_event",
                            "waiting_for_authorization",
                            "completed",
                            "failed",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "outcome_kind": {
                          "type": "string",
                          "enum": [
                            "none",
                            "research",
                            "offer_found",
                            "booking_confirmed"
                          ]
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "next_action": {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/create_mission": {
      "post": {
        "operationId": "create_mission",
        "summary": "Create mission",
        "description": "Create a mission from confirmed structured parameters: trip (route, date, passengers, budget), recurring_trip (2-12 one-way departures) or aircraft_sourcing (ACMI shortlist). The worker searches and, with a watch.create grant, watches for fares. It stops at waiting_for_authorization with an offer and checkout link and never books.",
        "x-scope": "traveler:write",
        "x-backing-route": "POST /api/v1/missions",
        "x-risk": "medium",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "type",
                  "constraints",
                  "confirm",
                  "idempotency_key"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "pattern": "^(trip|recurring_trip|aircraft_sourcing)$"
                  },
                  "objective": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "constraints": {
                    "type": "object",
                    "description": "trip: origin, destination, departure, trip, return_date, adults, children, infants, cabin and optional filters. recurring_trip: the same with departures[] instead of departure. aircraft_sourcing: aircraft_type, base_airport, min_seats, start_date, end_date."
                  },
                  "budget_minor": {
                    "type": "integer",
                    "description": "Required for trip and recurring_trip (with currency); the maximum total in the currency's minor unit, e.g. 15000 = EUR 150.00. Ignored for aircraft_sourcing.",
                    "minimum": 1,
                    "maximum": 100000000000
                  },
                  "currency": {
                    "type": "string",
                    "description": "Required with budget_minor for trip and recurring_trip.",
                    "pattern": "^(EUR|GBP|USD|JPY|KWD)$"
                  },
                  "deadline_at": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "timezone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "start": {
                    "type": "boolean"
                  },
                  "grant": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "scopes",
                      "expires_at"
                    ],
                    "properties": {
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^(watch\\.create|demand_pool\\.join)$"
                        }
                      },
                      "expires_at": {
                        "type": "string",
                        "maxLength": 40
                      }
                    }
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  },
                  "idempotency_key": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,128}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "mission",
                    "replayed"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "mission": {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "state",
                        "outcome_kind",
                        "revision",
                        "next_action"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{32}$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "trip",
                            "recurring_trip",
                            "aircraft_sourcing"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "ready",
                            "running",
                            "waiting_for_event",
                            "waiting_for_authorization",
                            "completed",
                            "failed",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "outcome_kind": {
                          "type": "string",
                          "enum": [
                            "none",
                            "research",
                            "offer_found",
                            "booking_confirmed"
                          ]
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "next_action": {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      }
                    },
                    "replayed": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/cancel_mission": {
      "post": {
        "operationId": "cancel_mission",
        "summary": "Cancel mission",
        "description": "Cancel an owned mission at its current revision. Linked route watches stay in the account. Cancelling an already cancelled mission returns it unchanged.",
        "x-scope": "traveler:write",
        "x-backing-route": "POST /api/v1/missions/{id}/control",
        "x-risk": "medium",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "mission_id",
                  "revision",
                  "confirm",
                  "idempotency_key"
                ],
                "properties": {
                  "mission_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  },
                  "idempotency_key": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,128}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "mission"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "mission": {
                      "type": "object",
                      "required": [
                        "id",
                        "type",
                        "state",
                        "outcome_kind",
                        "revision",
                        "next_action"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{32}$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "trip",
                            "recurring_trip",
                            "aircraft_sourcing"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "ready",
                            "running",
                            "waiting_for_event",
                            "waiting_for_authorization",
                            "completed",
                            "failed",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "outcome_kind": {
                          "type": "string",
                          "enum": [
                            "none",
                            "research",
                            "offer_found",
                            "booking_confirmed"
                          ]
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "next_action": {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_operator_opportunities": {
      "post": {
        "operationId": "list_operator_opportunities",
        "summary": "List operator opportunities",
        "description": "List the signed-in operator's Supply Autopilot inbox: demand pools that fit its fleet, ACMI requests, open availability windows and stale calendars. Items are leads to review, not certified eligibility; any price shown is an estimate, never a confirmed quote.",
        "x-scope": "operator:read",
        "x-backing-route": "GET /api/v1/operator/opportunities",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "include": {
                    "type": "string",
                    "pattern": "^(open|all)$",
                    "default": "open"
                  },
                  "kind": {
                    "type": "string",
                    "pattern": "^(demand_pool|expiring_quote|unresponded_request|unused_window|stale_availability|incomplete_metadata)$"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "items",
                    "total",
                    "counts",
                    "generatedAt",
                    "accountType"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "kind",
                          "state"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "open",
                              "dismissed",
                              "snoozed",
                              "done"
                            ]
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "counts": {
                      "type": "object"
                    },
                    "generatedAt": {
                      "type": "string"
                    },
                    "accountType": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/update_opportunity_state": {
      "post": {
        "operationId": "update_opportunity_state",
        "summary": "Update opportunity state",
        "description": "Mark one item in the signed-in operator's Supply Autopilot inbox as open, dismissed, snoozed (1, 3 or 7 days) or done. Use the key from list_operator_opportunities. This only triages the inbox; it never sends a quote or changes availability.",
        "x-scope": "operator:write",
        "x-backing-route": "POST /api/v1/operator/opportunities/state",
        "x-risk": "medium",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "key",
                  "state",
                  "confirm",
                  "idempotency_key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "pattern": "^[a-z-]{3,20}:[A-Za-z0-9:._-]{1,74}$"
                  },
                  "state": {
                    "type": "string",
                    "pattern": "^(open|dismissed|snoozed|done)$"
                  },
                  "snoozeDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 7,
                    "description": "Required with state snoozed: 1, 3 or 7."
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  },
                  "idempotency_key": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,128}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "item"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "item": {
                      "type": "object",
                      "required": [
                        "key",
                        "kind",
                        "state"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "open",
                            "dismissed",
                            "snoozed",
                            "done"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/list_inbox_items": {
      "post": {
        "operationId": "list_inbox_items",
        "summary": "List inbox items",
        "description": "List the signed-in traveler's exception inbox: trip changes, refunds, search and route-watch matches, demand-pool quotes and missions that need them. Items are derived from existing records; view active returns open items, all also returns snoozed, done and dismissed ones.",
        "x-scope": "traveler:read",
        "x-backing-route": "GET /api/v1/me/inbox",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "view": {
                    "type": "string",
                    "pattern": "^(active|all)$",
                    "default": "active"
                  },
                  "cursor": {
                    "type": "string",
                    "pattern": "^[0-9]{1,5}$",
                    "default": "0",
                    "description": "nextCursor from the previous page."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "view",
                    "items",
                    "nextCursor",
                    "total",
                    "counts"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "view": {
                      "type": "string",
                      "enum": [
                        "active",
                        "all"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "source",
                          "occurredAt",
                          "reason",
                          "actions",
                          "priority",
                          "state"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "source": {
                            "type": "object",
                            "required": [
                              "type",
                              "id",
                              "version",
                              "link",
                              "channels"
                            ],
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              },
                              "link": {
                                "type": "string"
                              },
                              "channels": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "occurredAt": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "object",
                            "required": [
                              "code",
                              "explanation",
                              "params"
                            ],
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "explanation": {
                                "type": "string"
                              },
                              "params": {
                                "type": "object"
                              }
                            }
                          },
                          "actions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "code",
                                "kind"
                              ],
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "link",
                                    "state"
                                  ]
                                },
                                "href": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "dismissed",
                                    "snoozed",
                                    "done"
                                  ]
                                }
                              }
                            }
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "high",
                              "normal",
                              "low"
                            ]
                          },
                          "state": {
                            "type": "object",
                            "required": [
                              "value",
                              "snoozedUntil",
                              "updatedAt"
                            ],
                            "properties": {
                              "value": {
                                "type": "string",
                                "enum": [
                                  "open",
                                  "dismissed",
                                  "snoozed",
                                  "done"
                                ]
                              },
                              "snoozedUntil": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "updatedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    },
                    "counts": {
                      "type": "object",
                      "required": [
                        "open",
                        "snoozed",
                        "dismissed",
                        "done"
                      ],
                      "properties": {
                        "open": {
                          "type": "integer"
                        },
                        "snoozed": {
                          "type": "integer"
                        },
                        "dismissed": {
                          "type": "integer"
                        },
                        "done": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    },
    "/agent/actions/update_inbox_item_state": {
      "post": {
        "operationId": "update_inbox_item_state",
        "summary": "Update inbox item state",
        "description": "Mark one item in the signed-in traveler's exception inbox as open, done, snoozed (1 to 720 hours) or dismissed. Use the key from list_inbox_items; the key carries the item's version, so a key replaced by a newer event is refused as superseded. This only triages the inbox; it never books, cancels or changes the underlying trip, watch, pool or mission.",
        "x-scope": "traveler:write",
        "x-backing-route": "POST /api/v1/me/inbox/state",
        "x-risk": "low",
        "x-action-version": "v1",
        "security": [
          {
            "agentToken": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "key",
                  "state",
                  "confirm",
                  "idempotency_key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "pattern": "^[a-z_]{1,32}:[A-Za-z0-9._-]{1,64}:[A-Za-z0-9._-]{1,64}$"
                  },
                  "state": {
                    "type": "string",
                    "pattern": "^(open|done|snoozed|dismissed)$"
                  },
                  "snoozeHours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 720,
                    "description": "Required with state snoozed; refused otherwise."
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  },
                  "idempotency_key": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,128}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "item"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "item": {
                      "type": "object",
                      "required": [
                        "key",
                        "source",
                        "occurredAt",
                        "reason",
                        "actions",
                        "priority",
                        "state"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "source": {
                          "type": "object",
                          "required": [
                            "type",
                            "id",
                            "version",
                            "link",
                            "channels"
                          ],
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "link": {
                              "type": "string"
                            },
                            "channels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "occurredAt": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "object",
                          "required": [
                            "code",
                            "explanation",
                            "params"
                          ],
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "explanation": {
                              "type": "string"
                            },
                            "params": {
                              "type": "object"
                            }
                          }
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "code",
                              "kind"
                            ],
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "link",
                                  "state"
                                ]
                              },
                              "href": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "open",
                                  "dismissed",
                                  "snoozed",
                                  "done"
                                ]
                              }
                            }
                          }
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "high",
                            "normal",
                            "low"
                          ]
                        },
                        "state": {
                          "type": "object",
                          "required": [
                            "value",
                            "snoozedUntil",
                            "updatedAt"
                          ],
                          "properties": {
                            "value": {
                              "type": "string",
                              "enum": [
                                "open",
                                "dismissed",
                                "snoozed",
                                "done"
                              ]
                            },
                            "snoozedUntil": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "updatedAt": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient token scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid action input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "agentToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "mcp token"
      }
    }
  }
}
