Your app's API

How the routes you write become the public, contract-validated, SDK-generating gateway surface — capabilities, the router, CRUD, errors, caching, cross-app calls and the published OpenAPI document.

Nothing your function answers is reachable from outside until a capability declares it. That one rule is the whole of this group.

A capability is one typed HTTP operation. You declare it in manifest.capabilities.json, and the platform serves its route verbatim under the gateway's /v1 prefix, validates every request against the contract before your function is invoked, and publishes the same declaration into the tenant's OpenAPI document — and from there into the generated SDKs, the API Explorer and the MCP server.

text
manifest.capabilities.json ──► routes under /v1 ──► /v1/openapi.json ──► SDKs · API Explorer · MCP
src/main.js                ──► the handler behind each route

So your API has two halves, and both have to agree:

  • The declaration — what the contract says the operation takes and returns. This is also your documentation; there is no second place to fix a wrong description.
  • The handler — the code the router dispatches to. Written with createApp, mountCrud and your own routes.

The trap in that split is worth stating up front: the declared contract must never be stricter than the handler. The gateway validates against the declaration, so a required field your handler treats as optional turns a working request into a 400 your code never sees.

In this group

  • API usage — the headers, errors, rate limits and pagination conventions every call to api.revenexx.com follows, yours included.
  • The typed client — what your handlers read and write.
  • Verifying live — calling your own capability through the gateway once it is deployed.