A CMS with an API: one source of content for every channel
Your prices, opening hours and news should look the same on your website, in your app and on the lobby screen. Learn how a CMS with an API keeps content in one place, how to model it for reuse and what to check before rollout.
You update your price list once, then fix it in four places: the website, the mobile app, the lobby screen and the newsletter footer. A week later, each version says something different. A CMS with an API solves this. A CMS with an API is a content management system that, besides editing in a dashboard, exposes content through a programming interface so any application can fetch it as structured data. This guide covers which channels one content source can feed, how to design content for reuse and what to watch for when you roll it out.
Key takeaways
- A CMS with an API stores content in one place and serves it as data (usually JSON) to your website, mobile app or information screens.
- Multichannel content needs to be split into fields such as title, price and image rather than one large block of formatted text.
- A read-only public API that returns only published content means an API key cannot be used to change anything.
- An edge (CDN) cache that is purged on publish lets API responses be both fast and up to date.
- Before choosing a system, list your channels, content types and the people who will keep them updated.
What a CMS with an API is and how it differs from a traditional CMS
A traditional CMS ties content to presentation: an editor types text and the system immediately turns it into an HTML page. That works while you have one channel. Once a mobile app or an in-store screen appears, content locked inside page templates has to be copied by hand.
A CMS with an API flips this around. Content is data first and a page second. Each channel asks the API for what it needs, say "the three latest news items in English", and decides how to display them. There are two flavours: pure headless, which renders no pages at all, and hybrid, where the CMS runs your website and exposes an API for other channels at the same time.
Multichannel content: which channels one source can feed
Typical consumers of a single content source:
- Website: the main channel, usually with full content and SEO.
- Mobile app: news, services, locations, opening hours, FAQs.
- Kiosks and digital signage: a restaurant menu, a class timetable, reception notices.
- Newsletter: the email template pulls the latest posts instead of someone copying them.
- Partner and reseller sites: a product catalogue or service list embedded on a partner site, always current.
- Internal tools: an intranet, a quote builder, a sales rep app.
Not every channel needs everything. A lobby screen shows a title and a time, the app shows a summary and the website gets the full description. That is why content design matters so much.
How to design content for reuse
The most common mistake when adopting a CMS with an API is carrying over website habits: one big "content" field where editors bold text and drop in tables and images. It looks fine on the website, but a mobile app or screen has no way to pull just the price or just the photo out of that block.
Content modelling rules for an API
- Fields, not blobs. Price, duration, image and description are separate fields. Each channel takes only what it needs.
- Short and long versions. A summary for apps and screens, a full description for the website. Don't rely on automatic truncation.
- Relations, not copies. If a service has an assigned specialist, link the entries with a relation rather than retyping the details.
- Stable identifiers. Apps reference entries by slug or ID, so don't change them without a reason.
- No channel-specific wording. Avoid "click the button on the right". A lobby screen has no right-hand side.
- Language at field level. Every field has a version per language, so a channel requests a language and never has to translate.
Example: a "Services" collection
| Field | Type | Used in |
|---|---|---|
| Name | text | all channels |
| Summary | textarea | app, newsletter, screen |
| Description | rich text | website |
| Price from | text | website, app, partner sites |
| Image | image | website, app, newsletter |
| Specialist | relation | website, app |
| Category | select | filtering in every channel |
A read-only public API: keeping your API key safe
Channels like apps and screens only need to read content. That is why, for many projects, the sensible choice is a read-only public API that returns published content only. Drafts, work in progress and dashboard data stay out of reach.
This model has concrete benefits:
- Even if an API key leaks from a mobile app, nobody can change or delete your content.
- A key is tied to a project and can be revoked and replaced without touching other projects.
- Editors work in the dashboard and channels only consume the result. No integration can overwrite someone's edit.
What if a channel needs to send something, such as a form submission from the app? A dedicated form submission endpoint covers that. If, however, an external system has to write data (for example, a real-time offer import from your ERP), check before you commit whether the CMS with an API supports writes at all. Many systems, LessCMS included, offer a read-only API.
API caching: fast and fresh at the same time
Every API call is a network request. When a thousand people visit your site and the app refreshes on every launch, an uncached system slows down fast. The fix is an edge cache (CDN): responses are stored on the server closest to the user and served from there.
The classic caching problem is stale data. So check whether the system purges the cache automatically on publish, ideally selectively by tag rather than all at once. Then changing the price of one service invalidates only the responses that include it.
On the channel side, remember two things:
- A mobile app should store the last fetched version and show it offline.
- Refresh screens and kiosks at a sensible interval, such as every few minutes, not on every slide.
Checklist for rolling out a CMS with an API
- List every channel and the data each one displays.
- Define content types (collections) and fields, starting with data shared by the most channels.
- Decide who updates each collection and how often.
- Choose whether the CMS renders your website or a developer builds a custom front end.
- Read the API docs: resources, filtering, languages, response format.
- Keep the API key server-side wherever possible, and assume it is public in mobile apps.
- Plan caching both at the CDN and in each channel.
- Test the scenario: an editor changes a price and you measure how long it takes to appear in every channel.
How LessCMS handles it
LessCMS works in two modes: it can render your whole site on your own domain (SSR) or act purely as an API for a custom front end. Either way, the same content is available to other channels.
- The public API is read-only, returns published content only and requires an
x-api-keyheader. Keys are per project and can be revoked. - The API covers pages, collections, menus, blocks, elements, redirects, sitemap, robots, config, routes, cookie consent and form submission. Swagger documentation lives at
/api-docs. - Pages are served from the Cloudflare edge, and publishing automatically purges the cache by tag (Cache-Tag). You can also purge it manually with a button.
- Field values have language versions, so a channel fetches content in the language it needs.
A collection endpoint looks like this:
https://api.lesscms.io/v1/{workspace}/{project}/collections/{code}
LessCMS does not offer GraphQL, webhooks or write access through the API. If your channels mostly read content, that is enough; if you need two-way sync, plan for it in your architecture. See the LessCMS API page for details, or read about content structure.
Frequently asked questions
Is a CMS with an API the same as a headless CMS?
Not always. A headless CMS delivers content only through an API and renders no pages. A CMS with an API can also run a regular website and treat the API as an extra channel.
Do I need a developer to use a content API?
Yes, connecting an app, screen or newsletter to an API requires development work. Editors keep working in the dashboard and don't need to know their content reaches several channels.
Is it safe to put an API key in a mobile app?
With a read-only API that returns only published content, the risk is limited because the key cannot change anything. Still, assume a key shipped in an app is public, and revoke and replace it if you see abuse.
How quickly does a CMS change show up in my app?
It depends on caching on both sides. If the CMS purges the CDN cache on publish, the API returns the new version immediately, and any delay comes mainly from how often the app refreshes.
Can I submit forms through the API?
In LessCMS, yes: the public API handles form submission, and entries arrive in the dashboard and by email. Every other resource is read-only.
Want to see one source of content power your website and other channels? Create an account without a card and compare plans on the LessCMS pricing page.