Brandfine Docs

Getting started

60-second integration. Get an API key, install the SDK, fetch your first posts.

This is the fastest path from zero to a working integration in a TypeScript/JavaScript project. For a deeper dive on either side, see the API reference or the SDK section.

1. Get your API key

In the Brandfine CMS, open your workspace's settings → API keys → Reveal. The key scopes to that single workspace — every API call uses it to identify which tenant's content to return.

2. Install the SDK

npm install @brandfine/client

If you're on Astro, also install the adapter:

npm install @brandfine/client-astro

3. Create the client

// src/lib/bf.ts
import { createBrandfineClient } from '@brandfine/client'

export const bf = createBrandfineClient({
  baseUrl: process.env.BRANDFINE_API_URL!,  // e.g. https://api.brandfine.co
  apiKey: process.env.BRANDFINE_API_KEY!,
})

4. Fetch your first posts

import { bf } from './bf'

const posts = await bf.posts.list({ type: 'blog' })
console.log(posts.map((p) => p.title))

That's it. From here:

On this page