Skip to content

CMS API

The CMS API provides programmatic access to your content, enabling integration with websites, apps, and other systems.

Overview

Use the API to:

  • Fetch content for websites
  • Integrate with mobile apps
  • Build custom frontends
  • Automate content workflows

API Basics

Base URL

Your CMS API is available at:

https://your-domain.com/cms/api/

Authentication

API requests require authentication:

  • API Key - For server-side access
  • Token - For authenticated users

Response Format

All responses are in JSON format.

Common Endpoints

List Content

Get all entries of a content type:

GET /cms/api/{content-type}

Get Single Entry

Get one content entry:

GET /cms/api/{content-type}/{id}

Query Parameters

ParameterDescription
pagePage number
limitItems per page
sortSort field and order
filterFilter criteria
populateInclude relations

Example Requests

Get All Blog Posts

GET /cms/api/blog-posts?limit=10&sort=createdAt:desc

Get Single Product

GET /cms/api/products/123

Filter by Status

GET /cms/api/articles?filter[status]=published

API Documentation Page

The CMS includes built-in API documentation:

  1. Go to CMSAPI
  2. View available endpoints
  3. See request/response examples
  4. Test endpoints directly

Features

Pagination

Results are paginated by default:

  • page - Current page
  • pageSize - Items per page
  • pageCount - Total pages
  • total - Total items

Sorting

Sort by any field:

?sort=createdAt:desc
?sort=title:asc

Filtering

Filter by field values:

?filter[category]=news
?filter[published]=true

Population

Include related content:

?populate=author,category
?populate=*  // all relations

Rate Limiting

API requests may be rate limited:

  • Check response headers for limits
  • Implement caching where possible
  • Use webhooks for real-time updates

Best Practices

Performance

  • Request only needed fields
  • Use pagination for lists
  • Cache responses appropriately
  • Avoid over-fetching

Security

  • Keep API keys secret
  • Use HTTPS only
  • Validate input data
  • Handle errors gracefully

Tips

  • Start Simple - Test basic queries first
  • Use Documentation - Reference built-in docs
  • Cache Wisely - Reduce API calls
  • Handle Errors - Plan for failures
  • Monitor Usage - Track API performance

💡 Note: API access may require specific permissions. Contact your administrator if you need API access.

Released under the MIT License.