Base URL & Versioning
Configure your API base URL, understand versioning strategies, and ensure your integration stays stable as FlowCMS evolves.
This guide covers FlowCMS v3.x. For v2.x documentation, use the version selector in the top navigation bar.
Overview #
FlowCMS exposes a RESTful API and a GraphQL endpoint that allow you to programmatically create, read, update, and delete content. Every API request is made against a base URL that includes your project identifier and the API version.
Understanding how to configure and use base URLs â along with FlowCMS's versioning strategy â is essential for building resilient integrations that won't break when we release new features.
Base URL Structure #
The FlowCMS API base URL follows a consistent structure across all environments:
https://{project-id}.api.flowcms.io/{api-version}/{resource}
URL Components
| Component | Description | Example |
|---|---|---|
| protocol | HTTPS (required for all API requests) | https:// |
| project-id | Your unique project identifier, found in Project Settings | acme-corp |
| api-version | The API version you want to use (v1, v2, or v3) | v3 |
| resource | The API resource endpoint (entries, assets, etc.) | entries |
Examples
# List all entries
https://acme-corp.api.flowcms.io/v3/entries
# Get a specific entry
https://acme-corp.api.flowcms.io/v3/entries/blog-post-slug
# Upload an asset
https://acme-corp.api.flowcms.io/v3/assets/upload
# GraphQL endpoint
https://acme-corp.api.flowcms.io/v3/graphql
Configuring Your Base URL #
You can set your base URL in several ways depending on your integration approach. Here's how to configure it across different environments.
Environment Variables
The recommended approach is to store your base URL in environment variables:
FLOWCMS_BASE_URL=https://your-project.api.flowcms.io/v3
FLOWCMS_ACCESS_TOKEN=fcm_live_sk_abc123...
FLOWCMS_PREVIEW_TOKEN=fcm_preview_pk_xyz789...
SDK Configuration
FlowCMS provides official SDKs for popular languages. Each SDK handles the base URL automatically:
import { FlowCMS } from '@flowcms/js-sdk';
// Initialize with project ID and token
const flow = new FlowCMS({
projectId: 'acme-corp',
accessToken: process.env.FLOWCMS_ACCESS_TOKEN,
apiVersion: 'v3',
baseUrl: 'https://acme-corp.api.flowcms.io' // optional override
});
// Fetch entries
const entries = await flow.entries.getAll({
type: 'blog_post',
limit: 10
});
from flowcms import Client
# Initialize with project ID and token
flow = Client(
project_id="acme-corp",
access_token=os.getenv("FLOWCMS_ACCESS_TOKEN"),
api_version="v3",
base_url="https://acme-corp.api.flowcms.io" # optional override
)
# Fetch entries
entries = flow.entries.get_all(
type="blog_post",
limit=10
)
use FlowCMS\Client;
// Initialize with project ID and token
$flow = new Client([
'project_id' => 'acme-corp',
'access_token' => $_ENV['FLOWCMS_ACCESS_TOKEN'],
'api_version' => 'v3',
'base_url' => 'https://acme-corp.api.flowcms.io',
]);
// Fetch entries
$entries = $flow->entries->getAll([
'type' => 'blog_post',
'limit' => 10,
]);
import (
"github.com/flowcms/go-sdk"
"os"
)
// Initialize with project ID and token
flow := flowcms.NewClient(flowcms.Config{
ProjectID: "acme-corp",
AccessToken: os.Getenv("FLOWCMS_ACCESS_TOKEN"),
APIVersion: "v3",
BaseURL: "https://acme-corp.api.flowcms.io",
})
// Fetch entries
entries, err := flow.Entries.GetAll(
flowcms.EntryFilter{
Type: "blog_post",
Limit: 10,
},
)
API Versioning Strategy #
FlowCMS uses URL-based versioning to ensure backward compatibility. Each major version of the API is isolated, allowing you to upgrade at your own pace. We never introduce breaking changes to an existing version. Once a new major version is stable, the previous version enters a deprecation window.
When a new major API version is released, the previous version is supported for a minimum of 18 months. We provide migration guides and automated tools to help you upgrade smoothly.
Current API Versions
| Version | Status | Released | End of Life |
|---|---|---|---|
v3 |
â Current | January 2025 | â |
v2 |
â Maintenance | March 2023 | March 2026 |
v1 |
â Deprecated | June 2021 | June 2025 | d>
Version Specifiers
You can pin your integration to a specific version or use a range specifier to automatically receive patch-level updates:
# Pin to exact version (recommended for production)
v3
# Allow patch updates within major version
v3.*
# Specific minor and patch version
v3.2.1
# Latest stable version (not recommended for production)
v3.latest
Always pin to an exact version in production (e.g., v3.2.1). Use v3.* only in development or staging environments where you want to test against the latest patch release.
Version via Header
Alternatively, you can specify the API version using the X-FlowCMS-Version request header. This is useful when you want to test multiple versions without changing your base URL.
curl https://acme-corp.api.flowcms.io/entries \n -H "X-FlowCMS-Version: v3.2.1" \n -H "Authorization: Bearer fcm_live_sk_abc123..." \n -H "Content-Type: application/json"
Core API Endpoints #
All endpoints are relative to your base URL. Here are the most commonly used endpoints with v3:
Retrieve a paginated list of entries. Supports filtering, sorting, and field selection.
GET /v3/entries?type=blog_post&limit=10&offset=0&fields=title,slug,date
{
"data": [
{
"id": "ent_abc123",
"title": "Getting Started with FlowCMS",
"slug": "getting-started-with-flowcms",
"date": "2025-01-15T10:30:00Z"
}
],
"meta": {
"total": 142,
"limit": 10,
"offset": 0,
"hasMore": true
}
}
Retrieve a single entry by its slug or ID.
GET /v3/entries/getting-started-with-flowcms
Create a new entry. The entry will be saved as a draft by default.
{
"type": "blog_post",
"fields": {
"title": "My New Post",
"slug": "my-new-post",
"body": "<p>Content here...</p>",
"status": "draft"
}
}
Update an existing entry. Supports partial updates â only send the fields you want to change.
Permanently delete an entry. This action cannot be undone.
Deleting an entry removes it from all environments and CDN caches. Consider using the status: "archived" field instead if you want soft deletion.
Execute GraphQL queries and mutations. Supports the full FlowCMS schema.
query GetBlogPosts {
entries(type: "blog_post", limit: 10) {
data {
id
title
slug
date
author {
name
avatar
}
}
meta {
total
}
}
}
Migrating Between Versions #
When upgrading between API versions, review the changelog for breaking changes and follow our migration checklist:
- Review the changelog â Identify all breaking changes between your current version and the target version.
- Update your SDK â Ensure your SDK version is compatible with the target API version.
- Test in staging â Deploy your changes to a staging environment first and run integration tests.
- Update your base URL â Change the version in your base URL from
v2tov3. - Monitor error rates â After deployment, watch for any increase in 4xx/5xx errors in your monitoring dashboard.
FlowCMS provides a CLI migration tool that can automatically detect breaking changes in your API calls. Run flowcms migrate --from v2 --to v3 to get started.
Notable Breaking Changes in v3
| Change | v2 | v3 |
|---|---|---|
| Authentication header | X-API-Key |
Authorization: Bearer |
| Response envelope | Root-level array | { data: [...], meta: {...} } |
| Date format | Unix timestamp | ISO 8601 string |
| Pagination | Cursor-based | Offset-based + cursor optional |
| Asset URLs | Relative paths | Full CDN URLs |
Frequently Asked Questions #
Can I use multiple API versions in the same project?
Yes. Different parts of your application can use different API versions. This is useful when you're gradually migrating a large codebase. Just make sure each API call includes the correct version in its URL or header.
What happens when a version reaches end of life?
When an API version reaches its end of life date, it will return 410 Gone responses with a migration guide URL in the response body. We recommend upgrading before this date to avoid service disruption.
Can I host FlowCMS with a custom domain?
Yes. Self-hosted and Enterprise plans support custom domains. In this case, your base URL would be something like https://cms.yourcompany.com/v3 instead of the FlowCMS cloud domain. Contact our sales team for details.
How do I find my project ID?
Navigate to Settings â Project in the FlowCMS dashboard. Your project ID is displayed at the top of the page. It's a unique, lowercase, hyphenated identifier (e.g., acme-corp).