API Reference

BlogSaaS provides two APIs — a dashboard API for authenticated users and a public headless CMS API for external consumers.

Base URL

https://yourdomain.com/api/v1

Authentication

Dashboard API (JWT)

All dashboard routes require a valid JWT in the access_token cookie (set automatically on login) or the Authorization header:

Authorization: Bearer eyJhbGc...

Also pass the workspace slug header:

x-workspace-slug: my-workspace

Public Headless API (API Key)

Public routes use API keys created in the dashboard:

X-API-Key: bsk_your_key_here

Response Format

// Success
{ "data": { ... } }

// Paginated
{ "data": { "data": [...], "meta": { "hasMore": true, "nextCursor": "clxxx" } } }

// Error
{ "error": "NOT_FOUND", "message": "Blog not found", "statusCode": 404 }

Available Endpoints

ResourceLink
BlogsBlogs API →
MediaMedia API →
AnalyticsAnalytics API →
API KeysAPI Keys →
WebhooksWebhooks →