✈
    TravelmodeDevelopers
    🔎/
    🔑Manage API Keys
    Feature
    🌦️Weather🛂Visa🧩Platform🧭Trips🤖Agent Runs📅Events

    Trips & Itinerary API · v1

    📖Overview🧪API Reference (Try It)
    Guides
    🚀Getting Started🔐Authentication🗺️Itinerary✏️Operations👥Permissions💡Proposals⚠️Errors
    ⬇️Download openapi.yaml
    Developers / Trips

    Trips & Itinerary API

    Read and mutate a trip's itinerary, run revision-tracked operations, manage collaborators, and drive the AI proposal workflow.

    Production base URLhttps://api.travelmode.ai
    Versionv1
    Specopenapi.yaml

    🧪 Open the API Reference

    Browse every endpoint, search the schema, and call production with the built-in Authorize / Try It console.

    🚀 Getting Started

    Read an itinerary and understand the response shape.

    Guides

    🚀

    Getting Started

    Read an itinerary and understand the response shape.

    🔐

    Authentication

    Session cookie, bearer token, and trip role gating.

    🗺️

    Itinerary

    Full itinerary, revision diffs, and the compact summary.

    ✏️

    Operations

    Atomic, revision-tracked timeline mutations and conflicts.

    👥

    Permissions

    List, grant, and revoke collaborator roles.

    💡

    Proposals

    List, create, accept, and reject AI proposals.

    ⚠️

    Errors

    Status codes and the error response shape.

    Travelmode Trips & Itinerary API

    Last verified: 2026-06-20 (Task #390 — User APIs documentation).

    This directory holds the public contract for the Trips & Itinerary feature of the Travelmode developer platform. The OpenAPI spec is the source of truth; the markdown guides below add narrative guidance and worked examples.

    Auth model: unlike the developer-key features (Weather, Visa, Platform), these endpoints use the end-user auth model — a logged-in session cookie or a mobile / extension bearer token identifies the caller, and access is gated by trip membership and role, not a tm_ API key. See authentication.md.

    Hosted developer portal

    Every file in this directory is published under the Trips feature of the portal, e.g. /developers/trips on the deployed app:

    URLWhat it serves
    /developers/tripsTrips feature overview (this README).
    /developers/trips/<slug>Each markdown guide (getting-started, authentication, itinerary, operations, permissions, proposals, errors).
    /developers/trips/referenceInteractive OpenAPI 3.1 reference (Stoplight Elements) with built-in Authorize and Try It panels.
    /developers/trips/openapi.yamlCanonical YAML spec, served raw.
    /developers/trips/openapi.jsonSame spec, JSON-encoded for tooling.

    Files

    FileWhat it contains
    openapi.yamlOpenAPI 3.1 spec — every Trips path, schema, and example. Validated by npm run check:openapi.
    getting-started.mdBase URL, auth quickstart, your first itinerary read.
    authentication.mdSession cookie, bearer token, and trip role gating.
    itinerary.mdReading the full itinerary, revision diffs, and the compact summary.
    operations.mdAtomic, revision-tracked timeline mutations and conflict handling.
    permissions.mdListing, granting, and revoking collaborator roles.
    proposals.mdListing, creating, accepting, and rejecting AI proposals.
    errors.mdStatus codes and the error response shape.

    Quick links

    • Response shape: resource objects (no { data, meta } envelope).
    • Error shape: { "error": <string | array> } — see errors.md.
    • Auth: session cookie or Authorization: Bearer <token> — see authentication.md.

    Validating the spec

    npm run check:openapi
    

    check:openapi parses every feature's OpenAPI YAML through @apidevtools/swagger-parser and runs the standard OpenAPI 3.x structural validator. It runs as part of npm run check.