REST API reference
This API allows clients to read, add, edit and delete site content (tables in site
schema), such as articles, menu items etc.
Methods
Section titled “Methods”See API parameters for more information about parameters.
Method | Endpoint | Description |
---|---|---|
GET | /cms-content/:slug | Get content by slug |
GET | /cms/:type | Get all content |
GET | /cms/:type/:id | Get a specific content by ID |
POST | /cms/:type/:id? | Create a new content |
PUT | /cms/:type/:id | Update an existing content |
DELETE | /cms/:type/:id | Delete an content |
Get content by slug
Section titled “Get content by slug”This endpoint allows you to get content by slug. (see API parameters)
GET /api/cms-content/novina-1
Response: 200 OK
{ "content_type_id": "0ccb6c1d5b15", "type": "collection", "table": "news", "title": "Новини", "status": "draft", "slug": "news", "columns": [ { "name": "title", "label": "Title", "type": "text", "required": true }, { "name": "slug", "label": "Slug", "type": "slug", "parent": "title", "required": true }, { "name": "status", "label": "Status", "type": "select", "options": [ { "id": "draft", "text": "Draft" }, { "id": "published", "text": "Published" }, { "id": "archived", "text": "Archived" } ], "required": true }, { "name": "published_at", "label": "Publish at", "type": "datetime", "required": true } ], "custom": true, "rows": [ { "id": "8c16854ca914", "slug": "novina-1", "title": "Новина 1", "status": "draft", "published_at": "2025-07-10 00:00:00", "meta": null, "created_at": "2025-07-08 09:18:12.017539", "updated_at": "2025-07-08 09:18:12.017539", "created_by": null, "updated_by": "2025-07-08 09:18:12.017539+03" } ]}
Get all content
Section titled “Get all content”This endpoint allows you to get all content. (see API parameters)
GET /api/cms/news
Response: 200 OK
{ "time": { "total": 1, "init": 0, "filter": 1, "data": 0, "count": 0, "format": 0 }, "total": 3, "filtered": 3, "count": 3, "pk": "id", "rows": [ { "id": "c75763dc8ee7", "slug": "demo", "title": "demo", "status": "draft", "published_at": "2025-07-08 00:00:00", "meta": null, "created_at": "2025-07-07 15:58:49.361299", "updated_at": "2025-07-07 15:58:49.361299", "created_by": "1", "updated_by": "1" }, { "id": "8c16854ca914", "slug": "novina-1", "title": "Новина 1", "status": "draft", "published_at": "2025-07-10 00:00:00", "meta": null, "created_at": "2025-07-08 09:18:12.017539", "updated_at": "2025-07-08 09:18:12.017539", "created_by": null, "updated_by": "2025-07-08 09:18:12.017539+03" } ]}
Get a specific content by ID
Section titled “Get a specific content by ID”This endpoint allows you to get a specific content by ID. (see API parameters)
GET /api/cms/news/8c16854ca914
Response: 200 OK
{ "time": { "total": 5, "init": 1, "filter": 1, "data": 1, "count": 1, "format": 1 }, "total": 1, "filtered": 1, "count": 1, "pk": "id", "rows": [ { "id": "8c16854ca914", "slug": "novina-1", "title": "Новина 1", "status": "draft", "published_at": "2025-07-10 00:00:00", "meta": null, "created_at": "2025-07-08 09:18:12.017539", "updated_at": "2025-07-08 09:18:12.017539", "created_by": null, "updated_by": "2025-07-08 09:18:12.017539+03" } ], "meta": { "title": "SEO title", "description": "SEO description", "keywords": "SEO keywords" }, "columns": [ { "name": "title", "label": "Title", "type": "text", "required": true }, // ... ], "filters": [], "preview_path": null, "custom": true}
Create a new content
Section titled “Create a new content”This endpoint allows you to create a new content. (see API parameters)
POST /api/cms/newsContent-Type: application/x-www-form-urlencoded
Response: 201 Created
{ "id": "3092989176618943940", "rows": [ { "id": "3092989176618943940", "slug": "test-slug", "title": "Test article", "status": "published", "publish_at": "2025-05-18 00:00:00", "meta_title": null, "meta_description": null, "meta_keywords": null, "created_at": "2025-05-18 00:00:00", "updated_at": "2025-06-18 12:52:28.940979", "created_by": "1", "updated_by": "1", "description": null, "image": "/files/uploads/2025-05-10/fbd4da55-fe03-4d67-b883-e3f7ec536d82.png", "tags": [ "CMS", "API", "REST" ], "body": "Brief description of the article", "category": null, "meta": null }, ],}
Update an existing article
Section titled “Update an existing article”This endpoint allows you to update an existing content. (see API parameters)
PUT /api/cms/news/3092989176618943940Content-Type: application/x-www-form-urlencoded
Response: 200 OK
{ "id": "3092989176618943940", "slug": "test-slug", "title": "Test article", "status": "published", "publish_at": "2025-05-18 00:00:00", "meta_title": null, "meta_description": null, "meta_keywords": null, "created_at": "2025-05-18 00:00:00", "updated_at": "2025-06-18 12:52:28.940979", "created_by": "1", "updated_by": "1", "description": null, "image": "/files/uploads/2025-05-10/fbd4da55-fe03-4d67-b883-e3f7ec536d82.png", "tags": [ "CMS", "API", "REST" ], "body": "Brief description of the article", "category": null, "meta": null}
Delete a content
Section titled “Delete a content”This endpoint allows you to delete a content. (see API parameters)
DELETE /api/cms/news/b47a9937401f
Response: 200 OK
{ "id": "b47a9937401f", "rowCount": 1, "slug": "test", "title": "test", "status": "draft", "published_at": "2025-07-07 00:00:00", "meta": null, "created_at": "2025-07-07 15:56:00.222623", "updated_at": "2025-07-07 15:56:00.222623", "created_by": null, "updated_by": "2025-07-07 15:56:00.222623+03"}