Sign In

provenby-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

provenby-api

Typed REST client for the ProvenBy API — zero dependencies, works in Node, Deno, Bun, and browsers.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

provenby-api

Typed REST client for the ProvenBy API.

Zero dependencies. Works in Node 18+, Deno, Bun, Cloudflare Workers, and browsers.

Install

npm install provenby-api

Quickstart

import { ProvenByClient } from 'provenby-api';

const client = new ProvenByClient({
  apiKey: process.env.PROVENBY_KEY!,
});

// Search candidates
const { items } = await client.search({
  skills: ['TypeScript', 'React'],
  minScore: 100,
});

// Query a candidate — tiered (card → digest → full context)
const answers = await client.query(items[0].candidateId, [
  'What is their strongest technical area?',
  'Do they ship code?',
]);

// Create a role
const role = await client.createRole({
  title: 'Senior Backend Engineer',
  required_skills: [{ skill: 'TypeScript', minLevel: 'senior' }],
});

// Register a webhook
await client.registerWebhook(
  'https://yourapp.com/webhooks/provenby',
  ['query.approved', 'signal.received'],
  'your-hmac-secret',
);

Configuration

new ProvenByClient({
  apiKey: 'sk_provenby_...',           // required
  serverUrl: 'https://provenby.dev',   // optional — defaults to prod
});

Error handling

import { ProvenByError } from 'provenby-api';

try {
  await client.query('bad-id', ['?']);
} catch (err) {
  if (err instanceof ProvenByError) {
    console.error(`${err.status}: ${err.message}`);
    // 401 → check API key
    // 404 → candidate not found
    // 429 → rate limited — respect Retry-After
  }
}

Rate limits

Free tier: 10 queries/min + 30 searches/min. Paid tier: 50 queries/min.

All responses include X-RateLimit-Remaining and Retry-After headers.

Build from source

npm run build  # produces dist/index.{js,cjs,d.ts}

Keywords

provenby

FAQs

Package last updated on 17 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts