TypeScript SDK
The SDK is a small typed client. Every path, parameter and response takes its type from the same definitions that validate requests, so it always matches the API reference.
Install
Section titled “Install”npm install @reminix/sdkMake a call
Section titled “Make a call”import { createClient, unwrap } from "@reminix/sdk";
const api = createClient({ token: process.env.API_KEY! });
const endpoints = unwrap(await api.GET("/workspace/webhook-endpoints"));for (const endpoint of endpoints.items) console.log(endpoint.url);- With an API key, every call acts in the key’s workspace.
- With a personal access token, name the workspace:
createClient({ token, workspace: "acme" }). unwrapreturns the data, or throws anApiErrorwith the error envelope’scode,message,statusandrequestId.- Writes can send an idempotency key:
api.POST("/workspace/webhook-endpoints", { body, headers: { "idempotency-key": id } }).