Welcome to Nebutra Sailor Docs 🎉
ChangelogIntroductionLicensing
Help Center (External) ↗

API Overview

The gateway REST API your scaffolded project ships with.

There is no hosted Nebutra API

backends/gateway — the sole business API per ADR 2026-09-24 — ships inside your scaffolded project. There is no api.nebutra.com for third-party customers to call, no nbk_live_ API key issuance, and no fixed request/response envelope defined by Nebutra: the shape of each endpoint is whatever your Hono route handler (built on @hono/zod-openapi) declares.

Where it runs

By default the gateway is mounted in-process inside apps/web at app/api/[[...route]] (GATEWAY_MODE=embedded) — same origin as your frontend, one process, one deploy. Set GATEWAY_MODE=external to run it standalone instead; unmatched /api/* paths then 404 in apps/web.

Source of truth: OpenAPI

The gateway self-documents. Run it locally and open:

GET /docs           # Swagger UI
GET /openapi.json    # the machine-readable spec

Every route your project defines — its request shape, response shape, and auth requirement — is generated from the Zod schemas in backends/gateway/src/routes/, not hand-maintained documentation that can drift from the code.

Adding an endpoint

nebutra generate route projects

Scaffolds a new route file in backends/gateway/src/routes/. Business endpoints belong here, not as apps/web route handlers — a shrink-only ratchet (scripts/lint-route-handlers.mjs) fails CI on a new one outside the frozen allowlist.

Related

Authentication

Session cookies and service-to-service tokens.

Error Codes

How the gateway reports errors.

How is this guide?

Edit on GitHub

Last updated on

On this page

There is no hosted Nebutra API
Where it runs
Source of truth: OpenAPI
Adding an endpoint
Related