Cms API

FonProxy Cms API reference documentation.

CMS Public API

Base path: /cms
No authentication required.


Categories

List categories

GET /cms/categories?locale=en

Returns all categories sorted by sortOrder. Name is returned in the requested locale (falls back to en).

Response

[
  { "id": 1, "slug": "blog", "name": "Blog", "sortOrder": 0 },
  { "id": 2, "slug": "docs", "name": "Documentation", "sortOrder": 10 }
]

Pages

List published pages

GET /cms/pages?locale=en&categorySlug=blog

Returns all published pages with translated metadata and author info.

Query params

ParamDefaultDescription
localeenen or uk
categorySlugFilter by category slug

Response

[
  {
    "id": 1,
    "slug": "about",
    "sortOrder": 0,
    "categoryId": 2,
    "publishedAt": "2026-04-01T00:00:00.000Z",
    "updatedAt": "2026-04-06T12:00:00.000Z",
    "author": {
      "id": "xK9mP2",
      "name": "Jane Doe",
      "bio": "Tech writer",
      "avatarUrl": "/uploads/cms/avatars/abc123.jpg"
    },
    "title": "About us",
    "metaTitle": "About FonProxy",
    "metaDescription": "Learn more about FonProxy"
  }
]

Get page by slug

GET /cms/pages/:slug?locale=en

Returns full page content. Falls back to en translation if the requested locale is missing.

Response

{
  "id": 1,
  "slug": "about",
  "sortOrder": 0,
  "categoryId": 2,
  "publishedAt": "2026-04-01T00:00:00.000Z",
  "updatedAt": "2026-04-06T12:00:00.000Z",
  "author": {
    "id": "xK9mP2",
    "name": "Jane Doe",
    "bio": "Tech writer",
    "avatarUrl": "/uploads/cms/avatars/abc123.jpg"
  },
  "translation": {
    "locale": "en",
    "title": "About us",
    "content": "## Hello\n\nThis is **markdown** content.",
    "metaTitle": "About FonProxy",
    "metaDescription": "Learn more about FonProxy",
    "updatedAt": "2026-04-06T12:00:00.000Z"
  },
  "headings": [
    { "level": 2, "text": "Hello", "anchor": "hello" }
  ],
  "files": [
    {
      "id": 3,
      "originalName": "brochure.pdf",
      "mimeType": "application/pdf",
      "size": 204800,
      "url": "/uploads/cms/a1b2c3d4.pdf"
    }
  ]
}

Errors

  • 404 — page not found or not published

Authors

Get author profile + pages

GET /cms/authors/:hashId?locale=en

Returns author info and their published pages.

Response

{
  "author": {
    "id": "xK9mP2",
    "name": "Jane Doe",
    "bio": "Tech writer at FonProxy",
    "avatarUrl": "/uploads/cms/avatars/abc123.jpg",
    "createdAt": "...",
    "updatedAt": "..."
  },
  "pages": [
    {
      "id": 1,
      "slug": "about",
      "sortOrder": 0,
      "categoryId": 2,
      "publishedAt": "2026-04-01T00:00:00.000Z",
      "updatedAt": "2026-04-06T12:00:00.000Z",
      "title": "About us",
      "metaTitle": "About FonProxy",
      "metaDescription": null
    }
  ]
}

Errors

  • 404 — author not found

Base path: /cms
No authentication required.


Categories

List categories (public)

GET /cms/categories?locale=en

Returns all categories sorted by sortOrder. Name is returned in the requested locale (falls back to en).

Response

[
  { "id": 1, "slug": "blog", "name": "Blog", "sortOrder": 0 },
  { "id": 2, "slug": "docs", "name": "Documentation", "sortOrder": 10 }
]

List published pages

GET /cms/pages?locale=en&categorySlug=blog

Returns all published pages with their translated metadata. Falls back to en if the requested locale has no translation.

Query params

ParamDefaultDescription
localeenen or uk
categorySlugFilter by category slug

Response

[
  {
    "id": 1,
    "slug": "about",
    "sortOrder": 0,
    "updatedAt": "2026-04-06T12:00:00.000Z",
    "title": "About us",
    "metaTitle": "About FonProxy",
    "metaDescription": "Learn more about FonProxy"
  }
]

Get page by slug

GET /cms/pages/:slug?locale=en

Returns full page content for the given slug and locale. Falls back to en translation if the requested locale is missing.

Response

{
  "id": 1,
  "slug": "about",
  "sortOrder": 0,
  "categoryId": 2,
  "updatedAt": "2026-04-06T12:00:00.000Z",
  "translation": {
    "locale": "en",
    "title": "About us",
    "content": "## Hello\n\nThis is **markdown** content.",
    "metaTitle": "About FonProxy",
    "metaDescription": "Learn more about FonProxy",
    "updatedAt": "2026-04-06T12:00:00.000Z"
  },
  "headings": [
    { "level": 2, "text": "Hello", "anchor": "hello" }
  ],
  "files": [
    {
      "id": 3,
      "originalName": "brochure.pdf",
      "mimeType": "application/pdf",
      "size": 204800,
      "url": "/uploads/cms/a1b2c3d4.pdf"
    }
  ]
}

Errors

  • 404 — page not found or not published