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

    Partner Trips API · v1

    📖Overview🧪API Reference (Try It)
    Guides
    🚀Getting Started🔐Authentication & Scopes🔗The Claim Flow🔔Description Sync & Webhooks⚠️Errors
    ⬇️Download openapi.yaml
    Developers / Partner Trips / The Claim Flow

    The Claim Flow

    A partner-created trip starts ownerless: it belongs to no travelmode user yet, only to your organization (and optionally one of your suppliers). The claim flow hands it to the group organizer so it appears in their own travelmode account — while your organization keeps API access to the trip throughout.

    How it works

    1. POST /v1/partner/trips returns claim.claim_url, e.g. https://travelmode.ai/partner/claim/3f2a.... The token is valid for 30 days.
    2. You send that URL to the group organizer (email, your site, chat — your channel).
    3. The organizer opens it. If they aren't signed in to travelmode, they sign in (or create an account) and land back on the claim page.
    4. They confirm — the trip becomes theirs: it shows up in their trip list, and they continue planning at the trip's planner_url with the full travelmode planner, including the AI assistant.

    After the claim

    • The partner trip view (GET /v1/partner/trips/[tripId]) keeps working — your access rides on the organization link, not on trip ownership. claim.status flips to claimed.
    • A trip.claimed webhook event fires if you subscribed.
    • Your PATCH access continues (name, description, summary), but visibility and public sharing belong to the organizer alone.

    Expired or leaked links

    Claim tokens expire after 30 days. While a trip is unclaimed you can mint a fresh link (invalidating the old one) with:

    curl -X POST \
      https://api.travelmode.ai/v1/partner/trips/1234/claim-token \
      -H "Authorization: Bearer tm_trips_your_key_here"
    

    Once a trip has been claimed the endpoint returns 409 — ownership is never transferred again through this API.

    Previous
    ← Authentication & Scopes
    Next
    Description Sync & Webhooks →