Overview
The Trueyy server SDK for Node.js - create interviews, mint tokens, verify webhooks, pull reports.
@trueyy-sdk/node is your backend SDK. It holds your tk_live_ master key, talks to the Trueyy API at https://api.trueyy.com, and exposes everything you need server-side.
Install
npm install @trueyy-sdk/nodeRequires Node ≥ 18 (native fetch, AbortController, crypto). Ships both ESM and CommonJS builds.
What's in the box
| Area | What it does |
|---|---|
| Interviews | Create an interview + its first round, list, fetch, add rounds, cancel. |
| Team | Invite interviewers, list members and pending invites. |
| Tokens | Mint short-lived browser JWTs per round and role. |
| Reports | Pull the per-round analysis report. |
| Billing | Read-only: plans, subscription, invoices, usage. |
| Webhooks | Express middleware that verifies signatures and parses events. |
| Errors | Typed error classes for every HTTP failure. |
Configure the client
import { Trueyy } from "@trueyy-sdk/node";
const trueyy = new Trueyy({
apiKey: process.env.TRUEYY_API_KEY!, // REQUIRED - tk_live_ or tk_test_
baseUrl: "https://api.trueyy.com", // optional - custom endpoint
timeout: 10_000, // optional - request timeout in ms
// fetchImpl: undici.fetch, // optional - inject a custom fetch
});See Authentication for keys and plan requirements.
The mental model
An interview is the parent process; it owns one or more ordered rounds (different interviewers or days). The round_id - returned by interviews.create and interviews.addRound - is the handle you pass to tokens.mint and reports.get. This is the same model the Trueyy dashboard uses.
Next step
New here? Follow the Quickstart for the full backend-to-frontend flow, then use these pages as the API reference.
TypeScript
Full types ship with the package. Handy request/response shapes:
import type {
CreateInterviewInput, RoundInput, Person,
Interview, RoundSummary, Member, Report, RefreshedToken, Page,
SessionStatus, // "SCHEDULED" | "ACTIVE" | "ENDED" | "CANCELLED"
SessionRole, // "candidate" | "interviewer" | "helper"
WebhookEvent, WebhookEventType,
} from "@trueyy-sdk/node";