Skip to content
brix.v2.15.0+b120c49

Search documentation

Loading search…

    Documentation menu
    Docs / APIs and dataRead Markdown
    On this page

    API Routes

    Brix uses one typed contract for server handlers, imperative clients, component hooks, caching, retries, and failures. Choose the workflow that owns the code you are changing.

    Define and implement an endpoint

    #

    Create a browser-safe contract, implement its server route, and understand route discovery and direct execution.

    Call an endpoint

    #

    Configure reusable clients, consume contracts from components, cache GETs, retry safely, and handle request failures.

    Return a custom HTTP response

    #

    Use a response contract and route for redirects, downloads, streams, or application-owned request processing. Schema-owned JSON or flat URL-encoded input with JSON output uses API contracts. Response routes share managed registration and typed URL generation, not the API client or response-validation contract.