thefaqapp
Skip to main content

Quickstart

Get from zero to first API call in under 5 minutes. Create an account, generate an API key, and start fetching content.

This guide walks you through setting up TheFAQApp and making API requests to read and create knowledge base content. By the end, you'll have a working integration that fetches questions from the platform.

Prerequisites

  • A TheFAQApp account (sign up free)
  • An HTTP client like curl, Postman, or a programming language with HTTP support
  • For the SDK path: Node.js 18+ and npm, yarn, pnpm, or bun

1. Create an Account and Organization

Sign up at thefaq.app and create an organization. The organization acts as the top-level container for all content, API keys, and settings. Each organization gets a unique slug (e.g., acme-corp) that's used in API paths.

2. Generate an API Key

Navigate to Dashboard → Settings → API Keys and click Create API Key. Choose the appropriate scope for the key:

  • Read — fetch questions, categories, and search results (available on all plans)
  • Write — create, update, and delete content (Starter plan and above)
  • Admin — manage keys, webhooks, and domain configuration (Pro plan and above)

Copy the key immediately — it's only displayed once:

faq_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345

Store it securely. If you lose it, revoke the old key and create a new one from the dashboard.

3. Make the First Request

Fetch all published questions for the organization:

curl https://www.thefaq.app/api/v1/your-org-slug/questions \
  -H "Authorization: Bearer faq_your-api-key"

Response:

{
  "data": [
    {
      "id": "clx...",
      "question": "How do I get started?",
      "answer": "<p>Follow our quickstart guide...</p>",
      "slug": "how-do-i-get-started",
      "published": true,
      "category": { "name": "Getting Started", "slug": "getting-started" },
      "createdAt": "2026-01-15T10:00:00.000Z"
    }
  ],
  "meta": { "pagination": { "page": 1, "limit": 25, "total": 1, "pages": 1 } }
}

If you see an empty data array, that's expected — you haven't created any questions yet. Jump to step 5 to add content via the API, or use the dashboard editor to create a few entries first.

4. Use the TypeScript SDK (Optional)

The SDK provides type-safe methods, automatic pagination, and built-in error handling on top of the REST API.

npm install @faqapp/core
import { FAQClient } from '@faqapp/core';

const client = new FAQClient({
  apiKey: 'faq_your-api-key',
  organizationSlug: 'your-org-slug',
});

// List all published questions
const page = await client.questions.list();
console.log(page.data);

// Search for specific content
const results = await client.search.query('shipping policy');
console.log(results.data);

For React and Next.js applications, the @faqapp/nextjs package adds server-side helpers and client hooks. See the Next.js SDK guide for details.

5. Create Content via the API

With a Starter plan or higher, you can create content programmatically:

curl -X POST https://www.thefaq.app/api/v1/your-org/questions \
  -H "Authorization: Bearer faq_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What are your business hours?",
    "answer": "<p>We are available Monday–Friday, 9am–5pm EST.</p>",
    "published": true
  }'

The response includes the created resource with its generated id and slug. Use these identifiers for subsequent updates or deletions.

6. Explore Further

Now that the basics are working, explore the full platform capabilities: