{"openapi":"3.1.0","info":{"title":"Duffel (BYOK) API","version":"0.1.0","description":"Duffel (BYOK) lets an AI assistant read your own Duffel data through the Duffel API with a key you supply (Duffel access token). Read-only: 11 tools (list_airports, get_airport, suggest_places, list_airlines, get_airline, list_aircraft, list_cities, list_loyalty_programmes, list_orders, get_order, list_order_available_services). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-duffel.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-duffel/docs"},"termsOfService":"https://connectorbay.com/byok-duffel/terms"},"servers":[{"url":"https://byok-duffel.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-duffel/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_airports":{"post":{"operationId":"list_airports","summary":"List airports with IATA and ICAO codes, city, country, time zone and coordinates; filter by country. Use for \"Which airp","description":"List airports with IATA and ICAO codes, city, country, time zone and coordinates; filter by country. Use for \"Which airports are there in the United Kingdom\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"iata_country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter country code (ISO 3166-1), for example GB.","title":"Iata Country Code"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_airportsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_airport":{"post":{"operationId":"get_airport","summary":"Get one airport by its Duffel ID (for example arp_lhr_gb) with codes, city, time zone and coordinates. Use for \"What is ","description":"Get one airport by its Duffel ID (for example arp_lhr_gb) with codes, city, time zone and coordinates. Use for \"What is the time zone and location of Heathrow\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"airport_id":{"description":"Duffel airport ID, for example 'arp_lhr_gb' (from list_airports or suggest_places).","maxLength":200,"title":"Airport Id","type":"string"}},"required":["airport_id"],"title":"get_airportArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/suggest_places":{"post":{"operationId":"suggest_places","summary":"Find airports and cities by name, IATA code or position (radius around latitude and longitude). Use for \"What is the air","description":"Find airports and cities by name, IATA code or position (radius around latitude and longitude). Use for \"What is the airport code for Heathrow\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of an airport, city or country name, or an IATA code, for example 'heathr'.","title":"Query"},"lat":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Latitude to search around; send with lng and rad.","title":"Lat"},"lng":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Longitude to search around; send with lat and rad.","title":"Lng"},"rad":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Search radius in metres around lat and lng.","title":"Rad"}},"title":"suggest_placesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_airlines":{"post":{"operationId":"list_airlines","summary":"List airlines with name, IATA code, conditions-of-carriage link and logo URLs. Use for \"Which airlines does Duffel know ","description":"List airlines with name, IATA code, conditions-of-carriage link and logo URLs. Use for \"Which airlines does Duffel know about\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_airlinesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_airline":{"post":{"operationId":"get_airline","summary":"Get one airline by its Duffel ID with name, IATA code and conditions-of-carriage link. Use for \"What is the airline with","description":"Get one airline by its Duffel ID with name, IATA code and conditions-of-carriage link. Use for \"What is the airline with ID arl_00001876aqC8c5umZmrRds\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"airline_id":{"description":"Duffel airline ID, for example 'arl_00001876aqC8c5umZmrRds'.","maxLength":200,"title":"Airline Id","type":"string"}},"required":["airline_id"],"title":"get_airlineArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_aircraft":{"post":{"operationId":"list_aircraft","summary":"List aircraft types with name and IATA code. Use for \"What is the IATA code of the Airbus A320\".","description":"List aircraft types with name and IATA code. Use for \"What is the IATA code of the Airbus A320\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_aircraftArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_cities":{"post":{"operationId":"list_cities","summary":"List cities (metropolitan areas) with IATA code, country and their airports. Use for \"Which airports serve London\".","description":"List cities (metropolitan areas) with IATA code, country and their airports. Use for \"Which airports serve London\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_citiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_loyalty_programmes":{"post":{"operationId":"list_loyalty_programmes","summary":"List airline loyalty programmes with name, ID and the owning airline. Use for \"Which frequent flyer programmes are suppo","description":"List airline loyalty programmes with name, ID and the owning airline. Use for \"Which frequent flyer programmes are supported\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_loyalty_programmesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_orders":{"post":{"operationId":"list_orders","summary":"List the flight orders of your Duffel account (bookings) with reference, totals, payment status, slices and passengers; ","description":"List the flight orders of your Duffel account (bookings) with reference, totals, payment status, slices and passengers; filter by reference, passenger name or route. Use for \"Which of my Duffel bookings are still awaiting payment\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"booking_reference":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Exact booking reference (case-insensitive), for example 'RZPNX8'.","title":"Booking Reference"},"awaiting_payment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only orders awaiting payment, false for only the others.","title":"Awaiting Payment"},"requires_action":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for orders with unactioned airline-initiated changes.","title":"Requires Action"},"passenger_name":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"A passenger's given or family name (partial matches count).","title":"Passenger Name"},"origin_id":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only orders with a slice from this airport or city ID, for example 'arp_lhr_gb'.","title":"Origin Id"},"destination_id":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only orders with a slice to this airport or city ID.","title":"Destination Id"},"owner_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only orders of this airline ID.","title":"Owner Id"},"sort":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Sort by payment_required_by, total_amount, created_at or next_departure; prefix '-' for descending.","title":"Sort"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many orders to return (1 to 200).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging cursor: the `meta.after` value of the previous answer (treat it as opaque; empty when there are no more pages).","title":"After"}},"title":"list_ordersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_order":{"post":{"operationId":"get_order","summary":"Get one flight order by ID with slices, passengers, payment status, totals and documents. Use for \"What is the itinerary","description":"Get one flight order by ID with slices, passengers, payment status, totals and documents. Use for \"What is the itinerary and payment status of order ord_00009hthhsUZ8W4LxQgkjo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"order_id":{"description":"Duffel order ID, for example 'ord_00009hthhsUZ8W4LxQgkjo' (from list_orders).","maxLength":200,"title":"Order Id","type":"string"}},"required":["order_id"],"title":"get_orderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_order_available_services":{"post":{"operationId":"list_order_available_services","summary":"List extras (such as baggage) that can still be added to an order with their price; not supported for hold orders. Use f","description":"List extras (such as baggage) that can still be added to an order with their price; not supported for hold orders. Use for \"Can I add baggage to order ord_00009hthhsUZ8W4LxQgkjo and what does it cost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"order_id":{"description":"Duffel order ID, for example 'ord_00009hthhsUZ8W4LxQgkjo'.","maxLength":200,"title":"Order Id","type":"string"}},"required":["order_id"],"title":"list_order_available_servicesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}