Skip to main content

API reference

Base URL: https://api.i-catholic.org/v2/public/cms/{siteSlug}. There are exactly four paths:

MethodPathUsed for
GET/siteSite info, languages, categories, tags, menus
GET/entriesPost list (filter by category, tag, search, "Most read")
GET/entries/{entrySlug}One post or one page
POST/entries/{entrySlug}/viewSignal that counts one view

General rules:

  • No authentication. The API ignores any Authorization header; 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: lowercase a-z, digits and -, 1–64 characters. entrySlug: lowercase letters and digits joined by single - (for example le-bon-mang), at most 120 characters. A malformed slug gets the same 404 as 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
ParameterRequiredValue
localenovi, 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 }:

FieldTypeNotes
slugstringSite code.
primaryLocalestringPrimary language.
localesstring[]Enabled languages. Only these languages are served.
localestringThe language the info block was actually returned in (see Languages).
infoobject | nullThe unit's details. null when staff have never saved the details: have fallback content ready.
categoriesobject[]All categories, in tree order: each top-level category, then its children.
tagsobject[]All tags, sorted by name. Posts carry only the tag slug; read the tag name here.
menusobjectAlways has primary and footer (arrays, possibly empty).

info (plain-text strings, not HTML; print them as text):

FieldType
namestring (always non-empty)
shortName, legalName, tagline, motto, mottoRef, description, address, email, copyrightstring (may be empty)
phonesstring[] (at most 5)
officeHoursstring[] (at most 10 lines)
mapEmbedUrlstring | 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:

FieldTypeNotes
labelstringDisplay label.
kindentry | term | urlWhat the item points to.
slugstringFor entry and term.
entryTypepost | pageFor entry.
categorystringFor an entry that is a post: the main category slug, so you can build the right section URL.
taxonomycategory | tagFor term.
urlstringFor url: either a path on your site starting with /, or a full https:// address.
childrenobject[]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.

ParameterRequiredValue
localeyesOne of the site's enabled languages.
categorynoCategory slug. A parent category includes the posts of its child categories.
tagnoTag slug.
qnoSearch term, 2–100 characters after trimming whitespace. See Search.
sortnoOnly accepts popular ("Most read"): then page must be 1 and limit must be 3, 6 or 12.
pageyesInteger 1–100000.
limityesExactly 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.

Posts of an "unlisted" content type

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.

FieldTypeNotes
slugstring
categorystringMain category slug.
categoriesstring[]All of the post's categories.
tagsstring[]Tag slugs; read the names from /site.
title, excerptstringPlain text. excerpt may be empty.
publishedAtstringISO 8601, UTC. Display it in your own time zone.
featuredbooleanFeatured in this list. Always false in search and "Most read".
coverobject | nullCover image { url, alt }; url is a full https:// address, alt may be empty.
localestringAlways equal to the locale you asked for.
contentTypestring | nullContent type slug; null for regular posts.
metaobjectCustom 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
ParameterRequiredValue
localeyesAn 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:

FieldTypeNotes
typepost | page
categorystring | nullnull for pages (pages have no category; categories and tags are []).
bodyHtmlstringHTML content.
seoobject{ title, description, auto }.
featuredbooleanHere 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: only href with http:, https:, mailto:, always with rel="noopener noreferrer";
  • img: only src with https://, and alt;
  • 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"
}
statusCodeerrorCodemessage
404NOT_FOUNDAlways exactly "Not found". You cannot tell apart a wrong site, missing content or a language that is not enabled.
400VALIDATION_ERRORA 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 ; ).
429RATE_LIMITEDRate limit exceeded. See Limits.
5xxe.g. INTERNAL_ERRORServer-side error; try again later.

Branch on statusCode and (for 400) on message; note the requestId when you report an error to us.

Was this page helpful?