API Reference

HTTP API reference for the Wacht Frontend and Platform APIs.

Wacht exposes two distinct HTTP APIs with different purposes, audiences, and authentication models. Understanding which one to use is the first step.

Choosing the right API

Frontend APIBackend API
CallerBrowser, mobile, SDKYour server, CI/CD, admin tooling
AuthenticationSession cookie or dev query paramBearer API key
HostYour deployment's frontend hostapi.wacht.dev
PurposeUser-facing runtime flowsAdministrative control plane
ExposurePublic-facingPrivate — never expose to clients
SDK wrappersNext.js, React Router, TanStackNode SDK, Rust SDK

Response format

Both APIs return JSON. Successful responses wrap the payload in a data envelope:

{
  "data": { ... }
}

List endpoints return paginated results with cursor metadata:

{
  "data": [...],
  "has_more": true,
  "limit": 20,
  "offset": "cursor_token"
}

Errors follow a consistent shape across both APIs:

{
  "error": {
    "code": "resource_not_found",
    "message": "The requested resource could not be found.",
    "status": 404
  }
}

SDKs

For most use cases you should use an SDK rather than calling the APIs directly. The SDKs handle authentication, session management, and type safety automatically.

SDKLanguageWraps
Next.jsTypeScriptFrontend API
React RouterTypeScriptFrontend API
TanStack RouterTypeScriptFrontend API
NodeTypeScriptBackend API
RustRustBackend API

On this page