Documentation Index
Fetch the complete documentation index at: https://mintlify.com/emmanueljarquin-sys/GrupoMecsaCMS/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Grupo Mecsa CMS API provides a comprehensive interface for managing content, users, roles, and permissions within the CMS platform. The API is built on top of Supabase and provides both REST endpoints and a PHP SDK for seamless integration.Base URL
The API is hosted at:/rest/v1/ for data operations and /auth/v1/ for authentication operations.
Architecture
The CMS API uses a multi-schema architecture:- cms schema: Default schema for CMS-specific data (roles, permissions, content)
- public schema: Schema for employee data and system access
- auth schema: Supabase authentication (managed automatically)
Schema Selection
You can specify the schema using HTTP headers:Making API Requests
Using the PHP SDK
The recommended way to interact with the API is through the Supabase PHP class:Direct HTTP Requests
You can also make direct HTTP requests using cURL or any HTTP client:HTTP Methods
The API supports standard HTTP methods:- GET: Retrieve data
- POST: Create new records
- PATCH: Update existing records
- PUT: Replace records or update user data
- DELETE: Remove records
Response Format
All API responses are in JSON format:Environment Detection
The API automatically detects the environment:- Production: Detected when
HTTP_HOSTcontainsgrupomecsa.net - Development: Local configuration files are loaded (e.g.,
local.supabase.php)
Next Steps
- Authentication - Learn how to authenticate with the API
- Admin Roles Endpoint - Manage user roles and permissions
- Employee Role Endpoint - Update employee role assignments
- Supabase Class Reference - Complete PHP SDK documentation