JustFlows

HTTP API · v1

Public Content API

Build headless websites and applications with published content, media, navigation, and schemas from a Justflows site. The v1 API is read-only, JSON-based, and documented by a live OpenAPI 3.1 endpoint.

Base URL

text
https://your-site.example/api/v1

Enable the Public API in Admin → Settings. When the site or API is not public, endpoints return 404 rather than revealing private site state.

Quick start

Fetch recent posts
const response = await fetch(
  "https://your-site.example/api/v1/content?type=post&limit=10&locale=en"
);

if (!response.ok) throw new Error(`Justflows returned ${response.status}`);

const { items, nextCursor } = await response.json();

Endpoints

GET/api/v1/content

List published content

Query
type, slug, locale, limit (max 100), cursor
Response
{ items, nextCursor, total, locale }
GET/api/v1/content/{slug}

Get content by slug

Query
locale
Response
Content entry with fields and publishing metadata
GET/api/v1/content-types

List content types

Query
Response
{ types: [{ slug, label, description, builtin, fields }] }
GET/api/v1/media

List media

Query
limit (max 200)
Response
{ items: [{ id, filename, mimeType, url, altText, ... }] }
GET/api/v1/menus

List menus

Query
locale
Response
{ menus, locale }
GET/api/v1/menus/{slug}

Get menu by slug

Query
locale
Response
{ menu, locale }
GET/api/v1/openapi.json

OpenAPI 3.1 schema

Query
Response
OpenAPI document

Pagination

Content lists use cursor pagination. Pass nextCursor from one response as the next request’s cursor. Do not construct or increment cursors yourself.

json
{
  "items": [],
  "nextCursor": "01JEXAMPLE",
  "total": 20,
  "locale": "en"
}

Locales and previews

Pass locale to content and menu endpoints. The host resolves it against active site languages and applies the site default when omitted. preview=1 overlays working revisions only when the caller has an authorized editor session.

OpenAPI

Each site serves its current schema at /api/v1/openapi.json. Use it to generate a client, validate responses, or import the API into your preferred testing tool. Plugins can extend the document through the typed openapi.document filter.

shell
curl https://your-site.example/api/v1/openapi.json
curl "https://your-site.example/api/v1/content?type=page&limit=20"