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
https://your-site.example/api/v1Enable 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
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
/api/v1/contentList published content
- Query
- type, slug, locale, limit (max 100), cursor
- Response
- { items, nextCursor, total, locale }
/api/v1/content/{slug}Get content by slug
- Query
- locale
- Response
- Content entry with fields and publishing metadata
/api/v1/content-typesList content types
- Query
- —
- Response
- { types: [{ slug, label, description, builtin, fields }] }
/api/v1/mediaList media
- Query
- limit (max 200)
- Response
- { items: [{ id, filename, mimeType, url, altText, ... }] }
/api/v1/menusList menus
- Query
- locale
- Response
- { menus, locale }
/api/v1/menus/{slug}Get menu by slug
- Query
- locale
- Response
- { menu, locale }
/api/v1/openapi.jsonOpenAPI 3.1 schema
- Query
- —
- Response
- OpenAPI document
/api/v1/searchSearch published content
- Query
- q, type, locale, limit (max 100), cursor
- Response
- { items, nextCursor, total, locale } — 60 req/min/IP
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.
{
"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.
curl https://your-site.example/api/v1/openapi.json
curl "https://your-site.example/api/v1/content?type=page&limit=20"