REST API Reference
Use these endpoints to fetch content from your project. Pass your x-api-key header with every request. All responses return a consistent JSON structure.
[projectId] with your Project ID from the dashboard.x-api-key header. Generate your key in Project Settings → API Keys inside the dashboard.Blog Posts
Fetch, filter, and paginate blog posts for your frontend.
List & Filter Posts
Returns a paginated list of blog posts. Filter by status, category, tag, author, or keyword. Default status for API key requests is 'published'.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| x-api-key | Required | sk_live_12345678... | Your project API key from Project Settings → API Keys |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | number | Optional | Page number (default: 1) |
| limit | number | Optional | Posts per page (default: 20, max: 100) |
| status | string | Optional | published (default), draft, trash, or all |
| category | string | Optional | Filter by Category ID or slug (e.g. 'architecture') |
| subCategory | string | Optional | Filter by Sub-Category ID or slug |
| tags | string | Optional | Comma-separated Tag IDs or names (e.g. 'nextjs,redis') |
| authorItemId | string | Optional | Filter by Author Item ID |
| search | string | Optional | Search by post title or excerpt (case-insensitive) |
| sort | string | Optional | latest, oldest, published_latest, title_asc, title_desc |
Code Example
curl -X GET "https://your-cms-url.com/api/v1/projects/[projectId]/posts?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Posts fetched successfully",
"success": true,
"data": [
{
"_id": "65f6f7a8b9c0d1e2f3a4b5c6",
"title": "Building Real-Time Headless Workflows in Next.js 16",
"slug": "building-real-time-headless-workflows-in-nextjs-16",
"excerpt": "Learn how to optimize server components, Redis caching layers, and webhooks for instant CMS delivery.",
"content": "<h2>Building Real-Time Headless Workflows</h2><p>Detailed technical content...</p>",
"status": "published",
"authorData": {
"_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"firstName": "John",
"lastName": "Miller",
"avatar": "https://images.unsplash.com/..."
},
"categoryData": {
"_id": "65f2b3c4d5e6f7a8b9c0d1e2",
"name": "Architecture & Design",
"slug": "architecture-engineering-blog",
"type": "main"
},
"subCategoryData": {
"_id": "65f3c4d5e6f7a8b9c0d1e2f3",
"name": "Microservices & Distributed Systems",
"slug": "microservices-engineering-blog",
"type": "sub"
},
"tagsData": [
{
"_id": "65f4d5e6f7a8b9c0d1e2f3a4",
"name": "Next.js 16"
},
{
"_id": "65f5e6f7a8b9c0d1e2f3a4b5",
"name": "Redis"
}
],
"featuredImageData": {
"url": "https://cdn.example.com/...",
"publicId": "cms/hero",
"format": "jpg"
},
"publishedAt": "2026-08-01T10:00:00.000Z",
"createdAt": "2026-08-01T09:30:00.000Z"
}
],
"pagination": {
"total": 10,
"page": 1,
"limit": 20,
"itemsPerPage": 20,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false,
"nextPage": null,
"prevPage": null
},
"counts": {
"all": 10,
"published": 10,
"draft": 0,
"trash": 0
}
}Get Single Post
Fetch a complete post by its ID or URL slug. Returns full content, author, category, tags, SEO fields, and media.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| x-api-key | Required | sk_live_12345678... | Your project API key from Project Settings → API Keys |
Code Example
curl -X GET "https://your-cms-url.com/api/v1/projects/[projectId]/posts/[postId]?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Post fetched successfully",
"success": true,
"data": {
"_id": "65f6f7a8b9c0d1e2f3a4b5c6",
"title": "Building Real-Time Headless Workflows in Next.js 16",
"slug": "building-real-time-headless-workflows-in-nextjs-16",
"excerpt": "Learn how to optimize server components, Redis caching layers, and webhooks for instant CMS delivery.",
"content": "<h2>Building Real-Time Headless Workflows</h2><p>Detailed technical content...</p>",
"status": "published",
"metaTitle": "Building Real-Time Headless Workflows in Next.js 16",
"metaDescription": "Learn how to optimize server components and Redis caching layers.",
"metaKeywords": [
"Next.js",
"Redis",
"CMS"
],
"authorData": {
"_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"firstName": "John",
"lastName": "Miller",
"avatar": "https://images.unsplash.com/...",
"email": "[email protected]"
},
"categoryData": {
"_id": "65f2b3c4d5e6f7a8b9c0d1e2",
"name": "Architecture & Design",
"slug": "architecture-engineering-blog"
},
"subCategoryData": {
"_id": "65f3c4d5e6f7a8b9c0d1e2f3",
"name": "Microservices & Distributed Systems",
"slug": "microservices-engineering-blog"
},
"tagsData": [
{
"_id": "65f4d5e6f7a8b9c0d1e2f3a4",
"name": "Next.js 16"
},
{
"_id": "65f5e6f7a8b9c0d1e2f3a4b5",
"name": "Redis"
}
],
"publishedAt": "2026-08-01T10:00:00.000Z"
}
}Categories
Fetch main categories and nested sub-categories for navigation and filtering.
List Categories
Returns all main categories and their child sub-categories for a project.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| x-api-key | Required | sk_live_12345678... | Your project API key from Project Settings → API Keys |
Code Example
curl -X GET "https://your-cms-url.com/api/v1/projects/[projectId]/categories?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Categories fetched successfully",
"success": true,
"data": [
{
"_id": "65f8a8b9c0d1e2f3a4b5c6d7",
"name": "Architecture & Design",
"slug": "architecture-engineering-blog",
"type": "main",
"description": "System architecture and enterprise design patterns",
"subCategories": [
"65f8a8b9c0d1e2f3a4b5c6d8"
]
},
{
"_id": "65f8a8b9c0d1e2f3a4b5c6d8",
"name": "Microservices & Distributed Systems",
"slug": "microservices-engineering-blog",
"type": "sub",
"description": "Event-driven microservices, Kafka & Redis",
"parentCategories": [
"65f8a8b9c0d1e2f3a4b5c6d7"
]
}
]
}Media
Fetch uploaded images, videos, and documents from your media library.
List Media Assets
Returns uploaded media assets for a project.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| x-api-key | Required | sk_live_12345678... | Your project API key from Project Settings → API Keys |
Code Example
curl -X GET "https://your-cms-url.com/api/v1/projects/[projectId]/media?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Media items fetched successfully",
"success": true,
"data": [
{
"_id": "65f9a8b9c0d1e2f3a4b5c6d7",
"url": "https://cdn.example.com/...",
"publicId": "cms/hero_banner",
"format": "jpg",
"resourceType": "image",
"bytes": 1048576,
"createdAt": "2026-08-02T12:00:00.000Z"
}
]
}Forms
Submit and query project form entries. Submissions require a valid Project API Key.
Submit a Form Entry
Receives form submissions. Accepts JSON, URL-encoded, or multipart form data. Requires your project API key passed as a URL query parameter (?key=sk_live_...) or x-api-key header.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| Content-Type | Required | application/json | application/json, application/x-www-form-urlencoded, or multipart/form-data |
| x-api-key | Optional | sk_live_12345678... | Optional if passed via ?key= URL query parameter |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your Project API Key (e.g. 'sk_live_12345678...') |
| type | string | Optional | Optional submission type tag (e.g. 'SUPPORT', 'VIP', 'INQUIRY') |
Code Example
curl -X POST "https://your-cms-url.com/api/v1/f/[formId]?key=sk_live_YOUR_PROJECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "SUPPORT",
"fullName": "Sarah Jenkins",
"email": "[email protected]",
"priority": "HIGH",
"description": "Unable to connect to webhooks endpoint"
}'Response
{
"message": "Submission successful",
"success": true,
"submissionId": "66f7f8a9b0c1d2e3f4a5b6c7"
}List Form Submissions
Returns paginated submission records for a project form. Filter by type tag or page number. Requires user authentication.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | number | Optional | Page number (default: 1) |
| limit | number | Optional | Submissions per page (default: 20, max: 10000) |
| type | string | Optional | Filter by form type tag (e.g. 'SUPPORT' or 'all') |
Code Example
curl -X GET "https://your-cms-url.com/api/v1/projects/[projectId]/forms/[formId]/submissions?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Submissions fetched successfully",
"success": true,
"data": {
"submissions": [
{
"_id": "66f7f8a9b0c1d2e3f4a5b6c7",
"formId": "65f1a2b3c4d5e6f7a8b9c0d1",
"type": "SUPPORT",
"data": {
"fullName": "Sarah Jenkins",
"email": "[email protected]",
"priority": "HIGH",
"description": "Unable to connect to webhooks endpoint"
},
"referer": "https://example.com/contact",
"userAgent": "Mozilla/5.0...",
"createdAt": "2026-09-01T12:00:00.000Z"
}
],
"pagination": {
"total": 15,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
}Delete Single Submission Entry
Permanently deletes a specific submission entry by its submission ID.
Code Example
curl -X DELETE "https://your-cms-url.com/api/v1/projects/[projectId]/forms/[formId]/submissions/[submissionId]?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "Submission entry deleted successfully",
"success": true
}Bulk Delete Form Submissions
Deletes multiple form submission entries at once by providing an array of submission IDs.
Request Headers
| Header | Required | Example | Description |
|---|---|---|---|
| Content-Type | Required | application/json | Must be application/json |
Code Example
curl -X DELETE "https://your-cms-url.com/api/v1/projects/[projectId]/forms/[formId]/submissions?page=1&limit=10" \ -H "x-api-key: sk_live_YOUR_PROJECT_API_KEY"
Response
{
"message": "2 submission(s) deleted successfully",
"success": true,
"deletedCount": 2
}Common Error Codes
Missing or invalid x-api-key header.
The requested post, form, or project ID doesn't exist.
You've exceeded 100 requests per minute. Wait and retry.