v1.0 Stable

Powerful API for modern blogs

Deliver your content with millisecond latency. Our REST API is built for scale, providing a seamless way to integrate your BlogStudio content into any application, from React web apps to native iOS/Android experiences.

Quick Onboarding

Follow these three steps to get your blog content live in your project.

1

Get your Project ID

Locate your unique account identifier in Settings > Profile. This ID is required for every API call.

2

Generate API Key

Navigate to API Integration. Generate a Public Key for frontend use. Copy it instantly—it disappears forever once you leave the page.

💡
Pro Tip: Use "Allowed Domains" to restrict requests to your production URLs. This prevents others from using your API quota.

Endpoints

Our endpoints follow strict REST conventions and return clean JSON payloads.

GET /projects/:projectId/posts

Retrieves a paginated list of all published posts for your project.

Param Required Description
projectId Yes Your unique UUID project ID.
category No Filter by category (e.g. "Tutorials").
limit No Max results (1-100, default 10).

Integration Examples

Fetch API (JavaScript)

JavaScript
const BASE_URL = 'https://cms-project-drab.vercel.app/api/v1';
const PROJECT_ID = 'your-project-uuid';
const API_KEY = 'sb_pk_live_...';

async function initBlog() {
    const response = await fetch(`${BASE_URL}/projects/${PROJECT_ID}/posts`, {
        headers: { 'X-API-Key': API_KEY }
    });
    const { posts } = await response.json();
    
    // Render your posts
    console.log("Success:", posts);
}

Flutter / Dart

Dart
final url = Uri.parse('$baseUrl/projects/$projectId/posts');
final response = await http.get(url, headers: {
  'X-API-Key': apiKey,
});

if (response.statusCode == 200) {
  final data = json.decode(response.body);
  return data['posts'];
}