Skip to main content

Quickstart

Get up and running with cStar's headless support API in under 5 minutes. Choose your framework and follow the step-by-step guide to build your own custom support experience.

Developer Quest

0 / 400 XP

Prerequisites

  • A cStar account with a team created
  • An API key (get one from team settings or the CLI)
  • Node.js 18+ (for server-side usage)

1. Get Your API Key

The fastest way to get an API key is with the cStar CLI.

# Install the CLI
npm install -g @cstar.help/cli

# Login and create a key
cstar login --api-key sk_test_your_key_here
cstar status

You can also create keys from your team settings page or via the API.

2. Install the SDK

npm install @cstar.help/js

For React or Svelte, install the framework-specific package instead:

# React
npm install @cstar.help/react

# Svelte
npm install @cstar.help/svelte

3. Seed Sample Data

Once logged in, run the cstar seed command to populate your team with realistic help center content:

# Make sure you're logged in first (step 1 above)
cstar seed

You should see output like this:

Seeding help center for team "acme"
Environment: test
Template: helpdesk
────────────────────────────
✨ Categories:  5 created
✨ Articles:   12 created (11 published, 1 draft)
✨ Customers:   3 created
✨ Tickets:     5 created (with 13 messages)
────────────────────────────
✨ Seed complete!

This creates 5 categories, 12 articles, 3 sample customers, and 5 tickets with messages. The data goes into your test or live environment depending on which API key you used with cstar login — test keys (sk_test_*) create test data, live keys (sk_live_*) create live data.

4. Make Your First Request

index.js
import { CStarClient } from '@cstar.help/js';

const cstar = new CStarClient({
  apiKey: 'sk_test_your_key_here',
  teamId: 'your-team-id' // from cstar status
});

// List the articles you just seeded
const { data: articles } = await cstar.articles.list({
  status: 'published'
});

console.log(`Found ${articles.length} published articles`);
// → Found 11 published articles

// List categories with article counts
const { data: categories } = await cstar.categories.list();

for (const cat of categories) {
  console.log(`${cat.name}: ${cat.articleCount || 0} articles`);
}
// → Getting Started: 3 articles
// → Account & Billing: 2 articles
// → ...

Don't know your team ID? Run cstar status or call GET /api/v1/auth/whoami.

5. Build a Help Center

Now that you have data, pick your framework and follow the step-by-step guide to build a working help center with categories, articles, search, and chat.

What's Next?