API reference
Base URL: https://api.i-catholic.org/v2/public/cms/{siteSlug}. There are exactly four paths:
| Method | Path | Used for |
|---|---|---|
GET | /site | Site info, languages, categories, tags, menus |
GET | /entries | Post list (filter by category, tag, search, "Most read") |
GET | /entries/{entrySlug} | One post or one page |
POST | /entries/{entrySlug}/view | Signal that counts one view |
General rules:
- No authentication. The API ignores any
Authorizationheader; sending a token does not change the result. - Parameters are a closed set. A parameter not listed in that path's table is rejected with
400(for example?preview=1). siteSlug: lowercasea-z, digits and-, 1–64 characters.entrySlug: lowercase letters and digits joined by single-(for examplele-bon-mang), at most 120 characters. A malformed slug gets the same404as a slug that does not exist.- Responses never contain internal IDs, statuses, authors or drafts.
Get site info
GET /v2/public/cms/{siteSlug}/site?locale=vi
| Parameter | Required | Value |
|---|---|---|
locale | no | vi, en, es, pt, fr, it. If omitted, the site's primary language is used. Always set it explicitly (see cache). |
Response 200, shaped { data: PublicCmsSite }:
| Field | Type | Notes |
|---|---|---|
slug | string | Site code. |
primaryLocale | string | Primary language. |
locales | string[] | Enabled languages. Only these languages are served. |
locale | string | The language the info block was actually returned in (see Languages). |
info | object | null | The unit's details. null when staff have never saved the details: have fallback content ready. |
categories | object[] | All categories, in tree order: each top-level category, then its children. |
tags | object[] | All tags, sorted by name. Posts carry only the tag slug; read the tag name here. |
menus | object | Always has primary and footer (arrays, possibly empty). |
info (plain-text strings, not HTML; print them as text):
| Field | Type |
|---|---|
name | string (always non-empty) |
shortName, legalName, tagline, motto, mottoRef, description, address, email, copyright | string (may be empty) |
phones | string[] (at most 5) |
officeHours | string[] (at most 10 lines) |
mapEmbedUrl | string | null. When present, it is always a Google Maps embed URL (https://www.google.com/maps… or https://maps.google.com/…), for use as the src of an <iframe>. |
Category { slug, parent, name, position }: parent is the parent category's slug or null; the tree has at most two levels. Tag { slug, name }.
Menu item:
| Field | Type | Notes |
|---|---|---|
label | string | Display label. |
kind | entry | term | url | What the item points to. |
slug | string | For entry and term. |
entryType | post | page | For entry. |
category | string | For an entry that is a post: the main category slug, so you can build the right section URL. |
taxonomy | category | tag | For term. |
url | string | For url: either a path on your site starting with /, or a full https:// address. |
children | object[] | Child items (menus are at most two levels deep). |
entry and term items do not come with a ready-made URL: you build it from slug according to your site's structure (for example /trang/{slug} for pages, /tin-tuc/{slug} for posts, /tin-tuc?category={slug} for categories). Items pointing to content that has been removed, is unpublished or has no matching translation are already removed from the menu (together with their children).
function menuHref(item: MenuItem): string {
switch (item.kind) {
case 'entry':
return item.entryType === 'page' ? `/trang/${item.slug}` : `/tin-tuc/${item.slug}`
case 'term':
return `/tin-tuc?${item.taxonomy === 'tag' ? 'tag' : 'category'}=${encodeURIComponent(item.slug!)}`
case 'url':
return item.url! // starts with "/" (your site) or "https://" (external)
}
}
Errors: 404 (site does not exist, not enabled, language not enabled), 400 (locale outside the six languages, unknown parameter), 429.
Get the post list
GET /v2/public/cms/{siteSlug}/entries?locale=vi&page=1&limit=12
Returns only published posts (post) that have a translation in the locale language. Static pages (page) never appear in the list.
| Parameter | Required | Value |
|---|---|---|
locale | yes | One of the site's enabled languages. |
category | no | Category slug. A parent category includes the posts of its child categories. |
tag | no | Tag slug. |
q | no | Search term, 2–100 characters after trimming whitespace. See Search. |
sort | no | Only accepts popular ("Most read"): then page must be 1 and limit must be 3, 6 or 12. |
page | yes | Integer 1–100000. |
limit | yes | Exactly one of 3, 6, 12, 24, 100. |
category, tag, q and sort are mutually exclusive: sending two or more gets 400 with message: "CMS_FILTER_CONFLICT". Write the parameters in the order locale, category, tag, q, sort, page, limit.
Result order (without search and without sort): that list's own featured posts come first (in the order staff arranged, at most 10), followed by the newest posts by publishedAt. The general list (no filter) uses the home page's featured posts; a category list uses that category's featured posts; tag lists have no featured posts.
Staff can mark a content type as unlisted (for example a type used only for a dedicated section). Posts of that type do not appear in the general list, "Most read" or search results, but they do appear in category and tag lists, and can be opened by slug.
Response 200:
{
"data": [
{
"slug": "le-bon-mang",
"category": "tin-tuc",
"categories": ["tin-tuc"],
"tags": ["gioi-tre"],
"title": "Thánh lễ Bổn mạng",
"excerpt": "Đoạn tóm tắt ngắn…",
"publishedAt": "2026-10-12T01:30:00.000Z",
"featured": true,
"cover": { "url": "https://…/anh-bia.webp", "alt": "Cộng đoàn dâng lễ" },
"locale": "vi",
"contentType": null,
"meta": {}
}
],
"meta": { "page": 1, "limit": 12, "total": 37, "pageCount": 4 }
}
List items have no type field: every item is a post.
| Field | Type | Notes |
|---|---|---|
slug | string | |
category | string | Main category slug. |
categories | string[] | All of the post's categories. |
tags | string[] | Tag slugs; read the names from /site. |
title, excerpt | string | Plain text. excerpt may be empty. |
publishedAt | string | ISO 8601, UTC. Display it in your own time zone. |
featured | boolean | Featured in this list. Always false in search and "Most read". |
cover | object | null | Cover image { url, alt }; url is a full https:// address, alt may be empty. |
locale | string | Always equal to the locale you asked for. |
contentType | string | null | Content type slug; null for regular posts. |
meta | object | Custom fields. See Custom fields. |
The list's meta: { page, limit, total, pageCount }. A page beyond pageCount returns an empty data. With sort=popular, total is the number of items actually returned.
Errors: 404 (site/language as above, or a category/tag slug that does not exist), 400 (missing locale/page/limit, limit not in the list, CMS_FILTER_CONFLICT, CMS_SEARCH_QUERY_INVALID, CMS_POPULAR_QUERY_INVALID, unknown parameter), 429.
Get a single entry
GET /v2/public/cms/{siteSlug}/entries/{entrySlug}?locale=vi
| Parameter | Required | Value |
|---|---|---|
locale | yes | An enabled language. The entry must have a translation in exactly this language, otherwise 404. |
Returns a post or a page. In addition to every field of a list item, it has:
| Field | Type | Notes |
|---|---|---|
type | post | page | |
category | string | null | null for pages (pages have no category; categories and tags are []). |
bodyHtml | string | HTML content. |
seo | object | { title, description, auto }. |
featured | boolean | Here it is the featured flag of the home page list. |
The slug in the response may differ from the slug you asked for: when staff change a slug, the old slug still returns 200 with the current entry. See Old slugs.
seo: if staff leave it empty, the server generates it on read: title from the title (cut at 70 characters), description from the excerpt or body (cut at 160 characters, on a word boundary); auto is then true. In practice both are always strings, but the declared type allows null, so plan for it.
bodyHtml has already been filtered by the server against an allow list:
- tags:
p br strong b em i u a ul ol li h2 h3 blockquote hr img; a: onlyhrefwithhttp:,https:,mailto:, always withrel="noopener noreferrer";img: onlysrcwithhttps://, andalt;- no
style,class,id,on*or any other attribute.
Even so, filter it again on your side (for example DOMPurify with the same list) before inserting it with innerHTML / dangerouslySetInnerHTML: never fully trust a network response. This is also a good place to add loading="lazy" to images and target="_blank" to external links. Images in the body may be on any https server; if your site has a Content Security Policy, allow img-src https:.
Errors: 404 (site/language as above, entry does not exist, unpublished, scheduled for later, deleted, or no translation in this language), 400 (missing or invalid locale, unknown parameter), 429.
Send a view signal
POST /v2/public/cms/{siteSlug}/entries/{entrySlug}/view
No parameters, no request body, no headers. Always returns 204 with no content, even when the view is not counted. How to call it correctly and the counting rules: Views.
Error shape
Every error has the same shape:
{
"statusCode": 400,
"errorCode": "VALIDATION_ERROR",
"message": "limit must be one of the following values: 3, 6, 12, 24, 100",
"timestamp": "2026-10-19T12:34:26.516Z",
"requestId": "oaf24ltjxmpxia9x4dedtn4b"
}
statusCode | errorCode | message |
|---|---|---|
| 404 | NOT_FOUND | Always exactly "Not found". You cannot tell apart a wrong site, missing content or a language that is not enabled. |
| 400 | VALIDATION_ERROR | A code such as CMS_FILTER_CONFLICT, CMS_SEARCH_QUERY_INVALID, CMS_POPULAR_QUERY_INVALID, or a sentence describing the parameter error (several errors joined with ; ). |
| 429 | RATE_LIMITED | Rate limit exceeded. See Limits. |
| 5xx | e.g. INTERNAL_ERROR | Server-side error; try again later. |
Branch on statusCode and (for 400) on message; note the requestId when you report an error to us.