ApiCMS: the REST API to automate CartaCMS
Every CartaCMS site is born with a feature that often stays hidden until you really need it: a full REST API, ready to manage content from outside the browser. Its name is ApiCMS.
What you can do with it
With a simple X-API-Key header and an HTTP request to /admin/api.php you can create, read, update and delete articles, shop products, static pages, categories, menu, footer and even the CSS of the active theme. No panel to open, no manual clicks: everything scriptable, everything automatable.
All available actions
Here is the complete list of REST calls supported by ApiCMS:
| Action | Method | What it does |
|---|---|---|
list_languages | GET | List of active languages on the site |
list_categories | GET | List of blog categories |
list_shop_categories | GET | List of shop categories |
list_articles | GET | List of blog articles |
list_products | GET | List of shop products |
list_pages | GET | List of static pages |
get_article | GET | Reads an existing article |
get_product | GET | Reads an existing product |
get_page | GET | Reads an existing page |
create_article / update_article | POST | Creates or updates a blog article |
create_product / update_product | POST | Creates or updates a shop product |
create_page / update_page | POST | Creates or updates a static page |
delete_article / delete_product / delete_page | POST | Deletes existing content |
create_category / update_category / delete_category | POST | Manages blog categories |
create_shop_category / update_shop_category / delete_shop_category | POST | Manages shop categories |
get_menu / update_menu | GET/POST | Reads or updates the navigation menu (per language) |
get_footer / update_footer | GET/POST | Reads or updates the footer (per language) |
get_theme_css / update_theme_css | GET/POST | Reads or updates the CSS of the active theme |
A concrete example
Creating a new shop product, with title, price, description and image, takes a single POST call to create_product. The response already returns the public URL of the page you just created, ready to check. The same goes for an article, a page, or even a theme CSS update: read the current state with the matching get_* call, change only the fields you need, and send it all back with update_*.
For anyone who changes content often
Blogs publishing every day, shops with seasonal catalogs, multilingual sites that need to stay in sync: ApiCMS turns repetitive work into an automatable process, keeping the same philosophy as CartaCMS — zero database, zero dependencies, maximum simplicity.