Pages

Read CMS pages — documentation, blog posts, and landing pages served on inference shell.

Published pages are indexed in the pages search collection. Discover them via GET /suggest or GET /search?collection=pages. See Search API.

List responses use cursor pagination. See REST overview — response format.


Page object

FieldTypeDescription
idstringPage ID
short_idstringShort ID (first 8 characters)
titlestringPage title
slugstringURL slug (unique)
contentstringMarkdown body
excerptstringShort summary
statusinteger0 unknown, 1 draft, 2 published, 3 archived, 4 scheduled
typestringdoc, blog, or page
metadataobjectSEO and navigation metadata (title, description, image, tags, order, icon, hide_from_nav, publish_at)
publish_atstringRFC 3339 go-live time for scheduled pages — mirrors metadata.publish_at for convenience on read
is_featuredbooleanFeatured flag
visibilitystringVisibility scope (public, team, private)
created_atstringRFC 3339 timestamp
updated_atstringRFC 3339 timestamp

Metadata fields

FieldTypeDescription
publish_atstringRFC 3339 timestamp when a scheduled page (status = 4) should go live. Write this field here; responses also surface it at the top level. Ignored for other statuses. A scheduled page with no publish_at never auto-publishes.

Get page by slug

GET /pages/slug/{slug}

Returns a single page by slug path. No authentication required.

The slug path can include slashes (for example api/rest/overview).

bash
1curl https://api.inference.sh/pages/slug/api/rest/overview

Errors

StatusCodeWhen
400invalid_requestSlug path is empty
404not_foundNo page with that slug, the page was soft-deleted, or the page is draft, archived, or scheduled and the caller is not a platform admin

Non-published pages (draft, archived, scheduled) return 404 to unauthenticated callers and non-admin API keys. Platform admins can fetch scheduled and draft pages by slug for preview.

Soft-deleted pages are not returned. After a page is deleted, slug lookups respond with 404 even if the slug still appears in old links or caches. Search removes deleted pages on delete; allow a short propagation delay before assuming a slug is gone everywhere.


Get page by ID

GET /pages/{id}

Returns a page by full ID or short ID. No authentication required for public pages.

bash
1curl https://api.inference.sh/pages/page_abc123

Soft-deleted pages are excluded and return 404.


List pages

GET /pages or POST /pages/list

Returns published pages only (status = published). Draft, archived, and scheduled pages are omitted from list results.

Query parameters

FieldTypeDescription
cursorstringPagination cursor
limitintegerMax results (default 50, max 100)

Responses may include RFC 8288 Link headers (rel="next", rel="prev") with the same cursors.


Comments

GET /pages/{id}/comments or POST /pages/{id}/comments/list

List comments on a page. Uses the same cursor pagination pattern as other list endpoints.


Navigation menus (for example docs sidebars) are served separately:

EndpointDescription
GET /menus or POST /menus/listList menus
GET /menus/{id}Get menu by ID
GET /menus/slug/{slug}Get menu by slug

Menu items can reference pages by page_id or external url.


Deleted and scheduled pages

A deleted page is soft-deleted: removed from list and slug lookups, and dropped from the search index. Its slug can be used again by a new page.

A scheduled page (status 4) with metadata.publish_at stays hidden from public list and slug endpoints until its publish time. A background job periodically promotes due scheduled pages to status = published and indexes them for search. A scheduled page with no publish_at is never auto-published.

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.