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

    Platform API · v1

    📖Overview🧪API Reference (Try It)
    Guides
    🚀Getting Started🔐Authentication🪝Webhooks📊Usage
    ⬇️Download openapi.yaml
    Developers / Platform / Authentication

    Authentication

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

    Platform endpoints authenticate with the same developer API keys used across the Travelmode developer platform. A key identifies both the developer account and the environment (test vs production) that calls are billed against.

    Sending the key

    Use either header on every request:

    HeaderExample
    Authorization: Bearer <key>Authorization: Bearer tm_weather_abc123...
    X-API-Key: <key>X-API-Key: tm_weather_abc123...

    If both are present, Authorization wins. If neither is present you get api_key_missing (HTTP 401).

    Scopes

    EndpointRequired scope
    POST /v1/webhooksweather:webhooks
    GET /v1/webhooksweather:webhooks
    GET /v1/webhooks/{webhook_id}weather:webhooks
    DELETE /v1/webhooks/{webhook_id}weather:webhooks
    GET /v1/webhooks/{webhook_id}/attemptsweather:webhooks
    GET /v1/usagenone — any valid key can read its own usage

    A request whose key is missing the required scope gets scope_required (HTTP 403) with a details.required field naming the missing scope. The weather:admin wildcard scope, issued to internal tooling only, satisfies any scope check.

    Environments

    Each developer account has an environment of test or production, surfaced in meta.environment on every response. test accounts get isolated quotas, isolated webhook endpoints, and a separate billing ledger; there is no separate test base URL for the MVP.

    Errors at a glance

    CodeHTTPCause
    api_key_missing401No Authorization and no X-API-Key header.
    api_key_invalid401Header present but the key doesn't resolve.
    api_key_revoked401Key was explicitly revoked by an admin.
    api_key_expired401Key has an expires_at in the past.
    scope_required403Key valid but missing the scope the endpoint requires.
    account_suspended403Developer account has been suspended.
    Previous
    ← Getting Started
    Next
    Webhooks →