API Endpoints
The SiteX CMS REST API allows external applications and AI agents to manage content programmatically. All endpoints require authentication via the X-API-Key header.
Base URL
https://yourdomain.com/api/
Authentication
Include your API key in every request:
curl -H "X-API-Key: your_api_key_here" https://yourdomain.com/api/content-categ
Endpoints Overview
GET /api/content-categ
Retrieve all categories.
GET /api/content-categ
Headers: X-API-Key: your_key
Response 200:
{
"success": true,
"data": [
{
"id": 1,
"name": "Technology",
"slug": "technology",
"parent_id": null,
"article_count": 24
}
]
}
POST /api/publish-content
Publish articles, blog posts, categories, tops, or reviews.
Publish an Article
POST /api/publish-content
Headers:
X-API-Key: your_key
Content-Type: application/json
Body:
{
"type": "article",
"title": "Your Article Title",
"content": "<p>Article body in HTML</p>",
"category_id": 1,
"language": "en",
"status": "published",
"meta_title": "Custom SEO Title",
"meta_description": "Custom meta description",
"tags": ["php", "cms", "tutorial"]
}
Response 201:
{
"success": true,
"id": 42,
"url": "/your-article-title",
"message": "Article published successfully"
}
Publish a Blog Post
POST /api/publish-content
Body:
{
"type": "blog",
"title": "Blog Post Title",
"content": "Blog post content...",
"status": "draft"
}
Response 201:
{
"success": true,
"id": 18,
"url": "/blog/blog-post-title"
}
Create a Category
POST /api/publish-content
Body:
{
"type": "category",
"name": "New Category",
"description": "Category description",
"parent_id": null,
"language": "en"
}
Response 201:
{
"success": true,
"id": 8,
"slug": "new-category"
}
Publish a Top/Ranking Entry
POST /api/publish-content
Body:
{
"type": "top",
"title": "Best PHP Frameworks 2026",
"category_id": 3,
"items": [
{
"name": "Laravel",
"description": "Full-featured framework",
"rating": 4.8,
"position": 1
},
{
"name": "Symfony",
"description": "Enterprise-grade framework",
"rating": 4.6,
"position": 2
}
]
}
Response 201:
{
"success": true,
"id": 5,
"url": "/top/best-php-frameworks-2026"
}
Content Types
| Type | Value | Description |
|---|---|---|
| Article | article | Standard content article |
| Blog Post | blog | Blog/news post |
| Category | category | Content category |
| Top/Ranking | top | Ranked list with items |
| Review | review | Review/rating entry |
Status Values
| Status | Description |
|---|---|
published | Visible on the frontend |
draft | Saved but not visible |
scheduled | Will publish at specified date (requires publish_date) |
Error Responses
See Error Codes for a full list of error responses and their meanings.