TypeScript SDK
@zrelay/sdk is a typed client over the same REST API the
quickstart drives with curl: generated
request/response types from our OpenAPI spec plus a thin ergonomic wrapper
(ZRelayClient) built on openapi-fetch. It runs
anywhere fetch exists — Node 18+, Bun, Deno, edge runtimes.
Install
The package is served from our package registry, so point the
@zrelay scope there once per project:
Send, track, and read replies
Construct one ZRelayClient with your base URL and API key;
resources hang off it (notifications,
conversations, templates). All methods return
typed promises and throw ZRelayApiError on any non-2xx
response.
Error handling
ZRelayApiError carries the same envelope every endpoint
returns — code, status, retryable,
and the server-assigned requestId for support correlation.
See Errors for the full code table.
Other languages
Every endpoint is plain JSON over HTTPS, so any OpenAPI generator works against our public spec. If there is a language you want first-class support for, tell us: support@textycally.com.