Skip to main content
The fastest path to a Struct integration is the official SDK. It wraps every REST endpoint, both websocket endpoints, and webhook management in a single typed client. Types are generated directly from the live OpenAPI and AsyncAPI specs, so they match production exactly.

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

Last modified on May 27, 2026