Available SDKs
TypeScript / JavaScript
@structbuild/sdk runs in Node 18+, Bun, Deno, Cloudflare Workers, and every evergreen browser. Dual-published ESM/CJS, zero polyfills.Any other language
The REST and websocket protocols are language-agnostic. Use any HTTP and WebSocket client; the type definitions in the OpenAPI and AsyncAPI specs are public.
What’s included
REST client
Namespaced access to every endpoint with typed parameters and responses.
Rooms WebSocket
Typed
subscribe and on per room, with auto-reconnect, replay, and keepalive.Alerts WebSocket
Per-event typed filters sharing the same connection primitives.
JWT public key auth
Authenticate end users with their own JWTs. Safe to ship in the browser.
Pagination helper
Iterate any cursor-paginated endpoint with an async generator.
Typed errors
HttpError, TimeoutError, NetworkError, WebSocketError, and friends.Webhook management
Create, list, rotate, and delete webhook subscriptions from code.
Retries and hooks
Built-in exponential backoff and
onRequest / onResponse lifecycle hooks.At a glance
Why use the SDK?
Everything the SDK does is supported by the raw protocols, so you can drop down to plain HTTP or WebSocket whenever you need to.
Next steps
- Getting Started: install and instantiate the client.
- Configuration: timeouts, retries, hooks, custom base URL.
- Authentication: secret keys and JWT public-key flow.
- REST, Rooms WS, Alerts WS.