SDKs
The official TypeScript client, and using the API from any language.
TypeScript and JavaScript
@heizen/interviewer is a typed client with no dependencies. It runs on Node 20+, Bun, Deno and edge runtimes with fetch and WebCrypto.
npm install @heizen/interviewerimport { Heizen } from "@heizen/interviewer";
const heizen = new Heizen({ apiKey: process.env.HEIZEN_API_KEY! });
const invitation = await heizen.invitations.create({
interviewer_id: "int_…",
candidate: { email: "ada@example.com", name: "Ada Lovelace" },
expires_at: "2026-10-15T18:00:00Z",
});Field names match the API exactly, so everything in the API reference applies as written.
What it handles for you
- Retries.
429,5xx, in-flight idempotency conflicts and network errors retry up to twice with backoff, honouringRetry-After. - Idempotency. Every POST carries an
Idempotency-Key. The client generates one if you do not pass your own, and reuses it on retries. - Pagination.
list()can be awaited for one page or iterated withfor awaitfor every item. - Errors. Failures throw typed classes:
InvalidRequestError,NotFoundError,ConflictError,AuthenticationError,PermissionError,IdempotencyError,RateLimitError,ApiErrorandConnectionError, each withcode,paramandrequestId. - Webhooks.
verifyWebhook(rawBody, headers, secret)checks the signature and returns a typed event.
for await (const session of heizen.sessions.list({ status: "completed" })) {
const result = await heizen.sessions.result(session.id);
console.log(session.external_ref, result.overall_score);
}Options
| Option | Default | |
|---|---|---|
apiKey | required | hz_live_… or hz_test_… |
baseUrl | https://api.interviewer.heizen.tech | |
timeoutMs | 30000 | Per attempt |
maxRetries | 2 | |
fetch | global fetch | Swap in your own for tests or proxies |
Each method also takes a final options argument with idempotencyKey, signal and timeoutMs.
Other languages
The API is plain JSON over HTTPS, so any HTTP client works. Follow API basics, send an idempotency key on POSTs, and use the verification recipes for webhooks.