Introduction
The CEMAC API is a RESTful API that provides authentication and user management services for the CEMAC platform. The API is built with Express.js and deployed on Vercel.Base URL
The CEMAC API has different base URLs depending on your environment: Production:Response Format
All API responses follow a consistent JSON format:Success Response
Error Response
Authentication Success Response
HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Authentication required or failed |
404 | Not Found - Resource not found |
408 | Request Timeout - Request took too long to complete |
500 | Internal Server Error - Server encountered an error |
501 | Not Implemented - Feature not yet implemented |
504 | Gateway Timeout - External API timeout |
Request Headers
All API requests should include the following headers:CORS Configuration
The API supports Cross-Origin Resource Sharing (CORS) and includes appropriate headers in responses. In development mode, credentials are included in requests:The API automatically handles environment-specific configurations. You don’t need to manually configure CORS or credentials when using the AuthService.
Rate Limiting
API Status
You can check the API status using the status endpoints: Server Status:Available Routes
The CEMAC API currently provides the following route groups:- Authentication (
/auth/*) - User authentication and session management - API Status (
/api/status) - Server health and route information - Frontend (
/) - Static file serving and dashboard views