Developer APIs

Access FlowCMS programmatically through our REST and GraphQL APIs. Build integrations, automate workflows, and manage content at scale.

ℹ️
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API responses are returned in JSON format.

Authentication

FlowCMS uses API keys and Bearer tokens for authentication. You can generate keys from your Dashboard Settings.

HTTP Headers
# Include your API key in the Authorization header
Authorization: Bearer fcm_live_sk_8x92k3...
Content-Type: application/json
X-CMS-Version: 2024-10-01

Rate Limits

API requests are rate limited per API key. Standard limits:

PlanRequests / minBurst
Starter6010
Professional60050
EnterpriseCustomCustom

Content Endpoints

GET /api/v1/content/posts

List all posts

Returns a paginated list of content items. Supports filtering, sorting, and field selection.

ParameterTypeRequiredDescription
statusstringoptionalFilter by status: draft, published, archived
sortstringoptionalSort field: -created_at, title
limitintegeroptionalItems per page (default: 20, max: 100)
fieldsstringoptionalComma-separated fields to return
POST /api/v1/content/posts

Create a new post

Creates a new content item and returns the full resource with generated IDs.

Request Example

cURL
curl -X POST https://api.flowcms.io/api/v1/content/posts \
  -H "Authorization: Bearer $FLOW_CMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting Started with FlowCMS",
    "slug": "getting-started",
    "status": "draft",
    "content": {
      "type": "blocks",
      "blocks": [{
        "type": "paragraph",
        "text": "Welcome to the developer guide..."
      }]
    },
    "metadata": { "author_id": "usr_8x92", "tags": ["tutorial", "dev"] }
  }'

Official SDKs

We provide first-party SDKs for popular languages. All SDKs are open-source and handle authentication, retries, and pagination automatically.

JavaScript / TypeScript
import { FlowCMS } from "@flowcms/sdk";

const cms = new FlowCMS({
  apiKey: process.env.FLOW_CMS_API_KEY,
  environment: "production"
});

const posts = await cms.content.list({
  type: "posts",
  filter: { status: "published" },
  sort: "-published_at"
});

console.log(posts.data);
Python
from flowcms import Client

cms = Client(api_key="fcm_live_sk_...")

posts = cms.content.list(
    content_type="blog_post",
    status="published",
    limit=10
)

for post in posts:
    print(post.title, post.slug)

Error Responses

FlowCMS uses standard HTTP status codes and returns detailed error objects:

JSON
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Field 'title' is required",
    "details": {
      "field": "title",
      "rule": "required"
    },
    "request_id": "req_9x82k1m3"
  }
}
🔑
Always include the request_id when contacting support. It helps us trace API calls through our infrastructure.

GraphQL Endpoint

Prefer GraphQL? Access it at https://api.flowcms.io/graphql. Use the same Bearer token for authentication.

GraphQL
query GetPosts {
  posts(first: 10, status: PUBLISHED) {
    edges {
      node {
        id
        title
        slug
        author { name }
        seo { metaDescription }
      }
    }
  }
}