@trueyy-sdk/node

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.

npm

Install

npm install @trueyy-sdk/node

Requires Node ≥ 18 (native fetch, AbortController, crypto). Ships both ESM and CommonJS builds.

What's in the box

AreaWhat it does
InterviewsCreate an interview + its first round, list, fetch, add rounds, cancel.
TeamInvite interviewers, list members and pending invites.
TokensMint short-lived browser JWTs per round and role.
ReportsPull the per-round analysis report.
BillingRead-only: plans, subscription, invoices, usage.
WebhooksExpress middleware that verifies signatures and parses events.
ErrorsTyped 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";

On this page

Ask ChatGPT