Документация пока доступна только на английском языке. Остальная часть сайта соответствует вашему языку.
Public API
Anonymous REST for published content, types, media, and menus, plus OpenAPI and the public API kill switch.
8 минута чтения
The headless surface is `/api/v1`. It is anonymous: there are no API tokens. A Settings switch, Public API (public_api_enabled), takes the whole /api/v1 (and /api/site) prefix offline for anonymous users. Administrators and editors can still reach it. If the site is unpublished, anonymous callers get 404 unless they can view unpublished sites. GET responses send Access-Control-Allow-Origin: *. Anonymous callers are limited to 120 requests per minute per IP.
Endpoints
| Method | Path | Returns |
|---|---|---|
GET | /api/v1/content | Paginated published entries (includes fields). |
GET | /api/v1/content/:slug | One published entry by slug. |
GET | /api/v1/content-types | Registered type slugs, labels, and field schemas. |
GET | /api/v1/media | Media library items with public URLs. |
GET | /api/v1/menus | Navigation menus with resolved item URLs. |
GET | /api/v1/menus/:slug | One menu by slug. |
GET | /api/v1/openapi.json | OpenAPI 3.1 document for this surface. |
List published content
GET /api/v1/content?type=post&locale=en&limit=20| Query | Meaning |
|---|---|
type | Any registered content type slug (post, page, or a custom type). |
slug | Filter to one slug. |
locale | Resolved against site languages. |
limit | Page size, max 100, default 20. |
cursor | Id cursor for the next page. |
preview | 1 includes drafts when the request has an editor or administrator session. |
Response: { items, nextCursor, total, locale }. Items include id, type, title, slug, locale, excerpt, fields, and dates. The content.output filter runs on each item.
One item by slug
GET /api/v1/content/about?locale=enSite identity
GET /api/site/identity returns title, tagline, and logo for headless frontends. Public HTML still lives on /, /:segment, /:locale/:slug. GET /theme.css serves the effective theme CSS. There is no GraphQL surface and no webhook delivery in CE.
Careful
Admin JSON under /api/content, /api/users, and the rest requires a session cookie plus CSRF (jf_csrf cookie and x-csrf-token header) on mutating requests. That is not the public API.
Note
The public API is read-only. To push changes out of Justflows as they happen, use outgoing Webhooks.