✈
    TravelmodeDevelopers

    Weather Intelligence API · v1

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

    Weather Intelligence API

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

    Production base URLhttps://api.travelmode.app
    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 authenticated request in under five minutes.

    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.

    💳

    Billing

    Billing-unit table per endpoint and per outcome.

    🧊

    Cache & Freshness

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

    🪝

    Webhooks

    Webhook events, signing, and retries.

    📝

    Attribution

    Provider attribution requirements.

    Travelmode Weather Intelligence API

    Last verified: 2026-05-03 (Task #334 — docs accuracy pass).

    This directory holds the public contract for the Weather Intelligence API. The spec is the source of truth; the markdown sections below add narrative guidance, billing tables, and worked examples.

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

    Hosted developer portal

    Every file in this directory is published as a hosted developer portal at /developers on the deployed app, e.g. https://api.travelmode.app/developers:

    URLWhat it serves
    /developersLanding page with the section index.
    /developers/<slug>Each markdown file (getting-started, authentication, rate-limits, endpoints, errors, billing, cache-freshness, webhooks, attribution).
    /developers/referenceInteractive OpenAPI 3.1 reference (Stoplight Elements) with built-in Authorize and Try It panels.
    /developers/openapi.yamlCanonical YAML spec, served raw.
    /developers/openapi.jsonSame spec, JSON-encoded for tooling.

    The portal is a Next.js route under app/developers/ that reads this directory at runtime. 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 the spec is invalid — so a broken spec never reaches production.

    Files

    FileWhat it contains
    openapi.yamlOpenAPI 3.1 spec — every 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.
    billing.mdBilling-unit table per endpoint and per outcome.
    cache-freshness.mdCache behavior, freshness bands, X-Cache-Status.
    webhooks.mdWebhook events, signing, retries.
    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.

    Validating the spec

    npm run check:openapi
    

    check:openapi parses every YAML file in this directory 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.