Quick Start
Welcome to FlowCMS. This guide will walk you through setting up your workspace, installing the SDK, and making your first API request in under five minutes.
Step 1: Create Your Workspace
Sign in to your dashboard, click "Create Workspace", and select the "Starter Template". This provisions your project with default content models and API credentials.
# Install the FlowCMS CLI globally
npm install -g @flowcms/cli
# Login with your credentials
flowcms login
# Create a new project directory
mkdir my-flow-app && cd my-flow-app
flowcms init --template starter
Step 2: Configure Environment
FlowCMS uses a .env file to manage your project tokens. Copy the example file and paste your Project ID and API Key from the dashboard.
# FlowCMS Configuration
FLOWCMS_PROJECT_ID="proj_8x92k4m2p1qz"
FLOWCMS_API_KEY="sk_live_9f8a7b6c5d4e3f2g1h0i"
FLOWCMS_REGION="us-east-1"
FLOWCMS_ENV="production"
Step 3: Install the SDK
The official JavaScript/TypeScript SDK provides type-safe methods for querying, creating, and managing content. Install it alongside your preferred package manager.
# Install via npm
npm install @flowcms/sdk
# Or using yarn
yarn add @flowcms/sdk
Step 4: Make Your First Request
Create a simple script to fetch your blog posts. The SDK automatically handles authentication, pagination, and caching.
import { FlowClient } from '@flowcms/sdk';
import { config } from 'dotenv';
config();
const client = new FlowClient({
projectId: process.env.FLOWCMS_PROJECT_ID,
apiKey: process.env.FLOWCMS_API_KEY,
region: process.env.FLOWCMS_REGION,
});
async function getPosts() {
const response = await client.query('posts', {
fields: ['id', 'title', 'slug', 'published_at'],
filter: { status: 'published' },
sort: '-published_at',
limit: 10,
});
console.log(`Found ${response.total} posts`);
console.log(response.data);
}
getPosts();
Never commit your .env file to version control. Use environment variables in production and restrict API keys to specific domains when making client-side requests.
What's Next?
Now that your project is set up, explore the following guides to build your full workflow:
- Define Content Models â Structure your data with flexible schemas
- GraphQL vs REST â Choose the right API strategy for your stack
- Media Management â Upload, transform, and optimize assets
- AI Workflows â Automate tagging, translation, and content generation