SDKs

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/interviewer
import { 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, honouring Retry-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 with for await for every item.
  • Errors. Failures throw typed classes: InvalidRequestError, NotFoundError, ConflictError, AuthenticationError, PermissionError, IdempotencyError, RateLimitError, ApiError and ConnectionError, each with code, param and requestId.
  • 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

OptionDefault
apiKeyrequiredhz_live_… or hz_test_…
baseUrlhttps://api.interviewer.heizen.tech
timeoutMs30000Per attempt
maxRetries2
fetchglobal fetchSwap 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.