Client API Overview
This document provides an overview of the client-facing API endpoints available in v3. These endpoints are designed for public-facing applications and client applications that interact with the platform.
In This Document
Authentication
Client API endpoints require authentication using an API key. The API key should be included in the request headers:
Api-Key: {{api-key}}
API Structure
The Client API follows the same basic structure and conventions as described in the API v3 Basics document. All common query parameters, filtering capabilities, response formats, and error handling mechanisms apply to the Client API as well.
Available Modules
- CMS Module
- User Module
CMS Module
The CMS module provides access to content management features:
Features include:
- Posts: Retrieve and interact with posts
- Categories: Retrieve content categories
- Media: Access media files and galleries
User Module
The User module provides access to user-related features:
Features include:
- Authentication: User login and registration
- Profile: User profile management
- Preferences: User preference settings
Client-Specific Features
The Client API provides several features tailored for end-user applications:
Content Filtering
Client API provides robust content filtering capabilities:
GET /api/client/v3/cms/post?filter[]=status:published&filter[]=is_featured:true
Api-Key: {{api-key}}
Content Search
Client API offers powerful search functionality:
GET /api/client/v3/cms/post?search=keyword&searchFields=title;content
Api-Key: {{api-key}}
User Interactions
Client API allows users to interact with content:
POST /api/client/v3/cms/post/123/like
Api-Key: {{api-key}}
User Preferences
Client API enables saving and retrieving user preferences:
GET /api/client/v3/user/preferences
Api-Key: {{api-key}}
Example Usage
- Basic Request
- Filtering
- Pagination
- Including Relations
Basic Request
GET /api/client/v3/cms/post
Api-Key: {{api-key}}
Filtering by Status
GET /api/client/v3/cms/post?search=status:published&searchFields=status&searchJoin=and
Api-Key: {{api-key}}
Pagination
GET /api/client/v3/cms/post?per_page=10&page=2
Api-Key: {{api-key}}
Including Related Resources
GET /api/client/v3/cms/post/123?includes=author,category,tags
Api-Key: {{api-key}}
Response Example
Below is an example of a successful response when retrieving a post with related resources:
{
"status": true,
"result": {
"id": 123,
"title": "Sample Post Title",
"slug": "sample-post-title",
"excerpt": "This is a sample excerpt...",
"content": "This is the full content of the post...",
"featured_image": "https://example.com/images/sample-post.jpg",
"status": "published",
"created_at": "2025-03-15T10:30:00.000000Z",
"updated_at": "2025-03-15T14:45:00.000000Z",
"published_at": "2025-03-15T15:00:00.000000Z",
"author": {
"id": 5,
"name": "John Doe",
"avatar_url": "https://www.gravatar.com/avatar/abc123.jpg?s=80&d=mp&r=g"
},
"category": {
"id": 3,
"name": "Technology",
"slug": "technology"
},
"tags": [
{
"id": 7,
"name": "API",
"slug": "api"
},
{
"id": 12,
"name": "Documentation",
"slug": "documentation"
}
]
}
}