API Reference
Integrate FlowCMS into your applications using our RESTful API. All requests must be made over HTTPS and return JSON responses.
v1. Base URL for all production requests is https://api.flowcms.io/v1.Authentication
FlowCMS uses API keys to authenticate requests. You can generate and manage your API keys in the FlowCMS Dashboard under Settings â API Keys.
Authorization: Bearer sk_live_51MzK9j2eZvKYlo2C8xYzPqR7
Base URL & Versioning
All API requests should be made to the following base URL:
https://api.flowcms.io/v1
API responses are returned as JSON objects. Successful requests return appropriate HTTP status codes (200, 201, etc.).
Content Management
Retrieve a paginated list of published or draft posts. Supports filtering by status, category, and date range.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (default: 1) |
| limit | integer | Number of items per page (default: 20, max: 100) |
| status | string | Filter by status: published, draft, archived |
| sort | string | Sort field: created_at, updated_at, title |
Example Request
curl -X GET "https://api.flowcms.io/v1/content/posts?page=1&limit=10&status=published" \\ -H "Authorization: Bearer sk_live_your_api_key"
Example Response
{
"data: [
{
"id: "post_123abc",
"title: "Getting Started with FlowCMS",
"slug: "getting-started-with-flowcms",
"status: "published",
"author_id: "usr_456xyz",
"created_at: "2024-03-15T10:30:00Z",
"updated_at: "2024-03-16T14:22:00Z
}
],
"meta: {
"current_page: 1,
"total_pages: 5,
"total_items: 48
}
}
Create a new post. Draft posts are automatically saved unless publish: true is specified.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Required | Post title (max 200 characters) |
| content | string | Required | Markdown or HTML content body |
| slug | string | Optional | URL-friendly identifier (auto-generated if omitted) |
| publish | boolean | Optional | Publish immediately (default: false) |
Example Request
{
"title: "Advanced API Integration Guide",
"content: "# FlowCMS API Guide\n\nLearn how to...\n",
"slug: "advanced-api-guide",
"publish: true
}
Permanently delete a post. This action cannot be undone. Returns 204 No Content on success.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique post identifier |
Webhooks
Receive real-time notifications when content is created, updated, or published. Configure webhook endpoints in your dashboard.
{
"event: "content.published",
"timestamp: "2024-03-15T10:30:00Z",
"data: {
"type: "post,
"id: "post_123abc,
"action: "published
}
}
Error Handling
FlowCMS uses standard HTTP status codes to indicate success or failure. Errors include a structured response with codes and messages.
| Status Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource does not exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |