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 → API. 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

Each endpoint has its own reference page with parameters, request samples, and example responses.

Pagination

Content lists use cursor pagination. Pass nextCursor from one response as the next request’s cursor. Do not construct or increment cursors yourself. total is this page’s item count, not the size of the whole collection — keep requesting while nextCursor is non-null instead of comparing against it.

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"