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

    Weather Intelligence API · v1

    📖Overview🧪API Reference (Try It)
    Guides
    🚀Getting Started🔐Authentication⏱️Rate Limits📡Endpoints⚠️Errors🪝Watch Webhooks💳Billing🧊Cache & Freshness📝Attribution
    ⬇️Download openapi.yaml
    Developers / Weather

    Weather Intelligence API

    Activity-aware weather, timeline analysis, route weather, and weather watches under a single versioned /v1 surface.

    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

    Make your first request and see a successful response.

    Guides

    🚀

    Getting Started

    Make your first request and see a successful response.

    🔐

    Authentication

    API keys, scopes, and environments.

    ⏱️

    Rate Limits

    Plan tiers, quota dimensions, and throttling headers.

    📡

    Endpoints

    Per-endpoint reference with curl and JS examples.

    ⚠️

    Errors

    Every error code, status, and example envelope.

    🪝

    Watch Webhooks

    Per-watch webhook headers, signature, payload, and retries.

    💳

    Billing

    Billing-unit table per endpoint and per outcome.

    🧊

    Cache & Freshness

    Cache behavior, freshness bands, and X-Cache-Status.

    📝

    Attribution

    Provider attribution requirements.

    Travelmode Weather Intelligence API

    Last verified: 2026-06-20 (Task #388 — multi-feature portal restructure).

    This directory holds the public contract for the Weather Intelligence feature of the Travelmode developer platform. The OpenAPI spec is the source of truth; the markdown guides below add narrative guidance, billing tables, and worked examples.

    Status: v1, MVP. Endpoints are stable. The Weather feature is published in the developer portal at /developers/weather on the deployed app (e.g. https://travelmode.ai/developers/weather). Typed client SDKs are auto-generated from this spec — see sdks/typescript/ and sdks/python/.

    Cross-cutting developer endpoints (webhooks and usage/quota) are not part of the Weather surface — they live in the Platform feature and are published at /developers/platform.

    Hosted developer portal

    Every file in this directory is published under the Weather feature of the portal, e.g. https://travelmode.ai/developers/weather:

    URLWhat it serves
    /developers/weatherWeather feature overview (this README).
    /developers/weather/<slug>Each markdown guide (getting-started, authentication, rate-limits, endpoints, errors, watch-webhooks, billing, cache-freshness, attribution).
    /developers/weather/referenceInteractive OpenAPI 3.1 reference (Stoplight Elements) with built-in Authorize and Try It panels.
    /developers/weather/openapi.yamlCanonical YAML spec, served raw.
    /developers/weather/openapi.jsonSame spec, JSON-encoded for tooling.

    The portal is a Next.js route under app/developers/ that reads this directory at runtime via the feature registry (app/developers/lib/features/). There is no separate publish step: the moment a change to openapi.yaml or any *.md file lands on main and the deploy build runs (npm run build), the live portal serves the new content. The deploy build also runs npm run check:openapi, which fails the deploy if any feature spec is invalid — so a broken spec never reaches production.

    Files

    FileWhat it contains
    openapi.yamlOpenAPI 3.1 spec — every Weather path, schema, error code, header, and example. Validated by npm run check:openapi.
    getting-started.mdFirst request, base URL, auth quickstart.
    authentication.mdAPI keys, scopes, environments, internal keys.
    rate-limits.mdPlan tiers, quota dimensions, throttling, headers.
    endpoints.mdPer-endpoint reference + curl/JS examples.
    errors.mdEvery error code, status, and example envelope.
    watch-webhooks.mdPer-watch webhook headers, signature, payload envelope, and retry/backoff behaviour.
    billing.mdBilling-unit table per endpoint and per outcome.
    cache-freshness.mdCache behavior, freshness bands, X-Cache-Status.
    attribution.mdProvider attribution rules (placeholder).

    Quick links

    • Standard envelope: { data: T, meta: ApiMeta } — see endpoints.md#response-envelope.
    • Error envelope: { error: { code, message, details?, request_id }, meta } — see errors.md.
    • Auth: Authorization: Bearer tm_weather_... — see authentication.md.
    • Account-level webhooks & usage: documented in the Platform feature.
    • Per-watch webhooks (a watch's own webhook_url): signature, headers, payload, and retries in watch-webhooks.md.

    Validating the spec

    npm run check:openapi
    

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