Skip to main content

API Overview

The Steward API is a REST API built with Hono running on Bun. All responses follow a consistent ApiResponse<T> shape.

Base URL

Steward is self-hosted. Point the SDK and all requests at your own deployment. The default local Compose profile exposes the API on port 3200:
Replace this with your deployment’s URL when running behind your own domain and TLS.

Authentication

Steward supports three authentication methods:
For tenant-level operations (agent CRUD, policy management, secret management):
The API key is returned once when a tenant is created and cannot be retrieved again.

Platform Key

For platform-level operations (cross-tenant management), use the platform key:

Response Format

All endpoints return a consistent format:

HTTP Status Codes

Rate Limits

Both Bun and Workers enforce the global per-client request limit through Redis in production, so replicas and restarts share one budget. A guaranteed single-instance Bun deployment may explicitly acknowledge a restart-resetting memory limiter; development and test use bounded memory by default. Sensitive wallet routes can also enforce Redis-backed per-agent limits via policies. Rate-limited responses return 429 with Retry-After, standard RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers, plus legacy X-RateLimit-* compatibility headers. Successful wallet-action responses that evaluate a rate-limit policy include the same standard remaining budget headers without Retry-After.

Request Hardening Inventory

The generated OpenAPI contract marks sensitive mutating operations with x-steward-hardening. These operations are under the same sensitive-prefix inventory used by the request-expiry and authorization-signature middleware. For these routes:
  • X-Steward-Request-Timestamp or X-Steward-Request-Expires-At is required when request-expiry enforcement is enabled.
  • X-Steward-Signature is required when authorization signatures are enabled. The header accepts HMAC v1= signatures and P-256 p256= signatures.
  • X-Steward-Signing-Key-Id can select a managed tenant request-signing key.
  • Idempotency-Key is required for signed sensitive requests and recommended for all sensitive mutations.
OpenAPI also lists these headers as optional parameters because enforcement is deployment-configurable; the x-steward-hardening extension records when they become mandatory.

Idempotency and safe retries

For fund-moving or signing workflows, include a caller-stable referenceId in the request body when the endpoint supports it, and send an Idempotency-Key header for sensitive mutations where your deployment accepts or requires one. Use the same values when retrying after client timeouts so transaction history, audit events, and lifecycle webhooks can be correlated to one business operation. Bitcoin PSBT signing is sign/finalize-only: POST /vault/:agentId/sign-bitcoin-psbt returns Steward’s transactionId, may return finalized raw transaction metadata when finalize: true, and never broadcasts. Because the route enforces fee caps and spend/address policies before signing, clients should query by referenceId before creating replacement PSBT requests. If a finalized raw transaction was already handed to a broadcaster, do not retry that broadcast blindly; check the Bitcoin txId with your broadcaster or indexer first.

Route Groups

Content Type

All request bodies must be JSON:

Error Handling