@featurejet/sdk
v0.1.0
Published
Official Node.js and TypeScript SDK for the FeatureJet public developer API.
Maintainers
Readme
FeatureJet Node.js SDK
The official TypeScript-first Node.js SDK for FeatureJet's public developer API.
Install
npm install @featurejet/sdkNode.js 22 or newer is required.
Quickstart
import { FeatureJetClient } from "@featurejet/sdk"
const featureJet = new FeatureJetClient({
apiKey: process.env.FEATUREJET_API_KEY ?? "",
})
const { posts, total } = await featureJet.listPosts("feedback", {
status: "planned",
sort: "top",
limit: 25,
})
const created = await featureJet.createPost("feedback", {
title: "Dark mode",
body: "Please add a system theme.",
tags: ["UI"],
})
console.log({ total, firstPost: posts[0], created })baseUrl defaults to https://api.featurejet.com and timeoutMs defaults to 10,000.
Pass a custom fetch implementation when needed for instrumentation or testing.
Methods
| Endpoint | SDK method |
| --- | --- |
| GET /api/v1/boards | listBoards() |
| GET /api/v1/boards/{slug} | getBoard(slug) |
| GET /api/v1/boards/{slug}/posts | listPosts(slug, options?) |
| POST /api/v1/boards/{slug}/posts | createPost(slug, request) |
| GET /api/v1/boards/{slug}/posts/{id} | getPost(slug, postId) |
| PATCH /api/v1/boards/{slug}/posts/{id} | updatePost(slug, postId, request) |
| DELETE /api/v1/boards/{slug}/posts/{id} | deletePost(slug, postId) |
| GET /api/v1/boards/{slug}/posts/{id}/votes | listVotes(slug, postId) |
| GET /api/v1/boards/{slug}/posts/{id}/comments | listComments(slug, postId) |
| GET /api/v1/boards/{slug}/roadmap | getRoadmap(slug) |
| GET /api/v1/boards/{slug}/changelog | getChangelog(slug, options?) |
| GET /api/v1/boards/{slug}/ship-stats | getShipStats(slug, options?) |
| GET /api/v1/boards/{slug}/analytics | getAnalytics(slug, options?) |
The SDK does not retry requests or automatically fetch additional pages. listPosts and
getChangelog default to limit: 100 and offset: 0; the API caps limit at 500.
Authentication and rate limits
Create a live API key in the FeatureJet dashboard and keep it server-side. The SDK sends it as
Authorization: Bearer fj_live_... and redacts it from errors. Raw keys are shown only once by
FeatureJet.
The public API allows 120 requests per minute per API key. A 429 response throws
FeatureJetRateLimitError; its retryAfter property contains integer seconds from the
Retry-After header when supplied. Version 0.1 does not retry automatically.
Errors
FeatureJetConfigurationErrorfor invalid client optionsFeatureJetApiErrorfor API, transport, or invalid-JSON failuresFeatureJetRateLimitErrorfor HTTP 429 responsesFeatureJetTimeoutErrorwhentimeoutMselapses
API response properties preserve FeatureJet's JSON field names, including snake_case names such as
vote_count, created_at, and status_breakdown.
Responses are typed at compile time but not validated at runtime (the SDK has zero runtime
dependencies): a server response whose shape diverges from the documented contract is returned
as received rather than raising an invalid_response error.
