Getting started
Install the SDK, make your first API call, and ship FAQ content in your app in five minutes.
Updated 2026-10-11
bun add @faqapp/core
The @faqapp/core SDK wraps the v1 API with a typed client. It works in Node.js, Bun, Deno, edge runtimes, and the browser. Browser code must use a publishable key, which reads published FAQs and search only; keep server keys on your server.
Authenticate
Every request is scoped to one organization and authenticated with an API key. Create the key in the dashboard at app.thefaq.app, then put it in your environment:
FAQAPP_API_KEY=your-server-key
Make the first call
import { createFAQClient } from "@faqapp/core";
const faq = createFAQClient({
apiKey: process.env.FAQAPP_API_KEY,
organizationSlug: "acme"
});
const page = await faq.questions.list({ limit: 20 });
console.log(page.data.length, page.pagination.total);
page.data is a typed array of questions, and page.pagination holds page, limit, total, and pages. The SDK throws a typed error on any non-2xx response.
Ship it in your app
For React, install @faqapp/react and use a publishable key in the browser:
bun add @faqapp/react
import { createFAQClient, FAQClientProvider, usePublishedFaqs } from "@faqapp/react";
const faq = createFAQClient({
apiKey: import.meta.env.VITE_FAQAPP_PUBLISHABLE_KEY,
organizationSlug: "acme"
});
export function Page() {
return (
<FAQClientProvider client={faq}>
<Questions />
</FAQClientProvider>
);
}
function Questions() {
const { data } = usePublishedFaqs();
return data?.map(entry => <article key={entry.slug}>{entry.question}</article>);
}
The hooks fetch after mount. For server-rendered pages, call @faqapp/core with a server key on the server and pass the result down as props.
What you should read next
- Concepts: organizations, members, keys: the data model
- SDK reference: every method
- Recipes: Next.js app router: the most common integration