🚀 Express API Server

Robust REST API with Authentication & User Management

Version 1.0.0 Development Online

Health Check

GET
/health
Server health check endpoint
No Auth Required

🔐 Authentication

POST
/api/auth/register
Register a new user account
No Auth Required
POST
/api/auth/login
Login and receive JWT token
No Auth Required
GET
/api/auth/me
Get current authenticated user profile
Auth Required

👥 Users

GET
/api/users
Get all users (paginated)
Query params: ?page=1&limit=10
Auth Required
GET
/api/users/:id
Get user by ID
Auth Required
POST
/api/users
Create a new user
Auth Required Admin Only
PUT
/api/users/:id
Update user information
Auth Required
DELETE
/api/users/:id
Delete user (soft delete)
Auth Required Admin Only

📚 Documentation

Authentication: Use JWT token in the Authorization header

Authorization: Bearer <your-jwt-token>

Base URL:

Response Format: All responses follow a consistent JSON structure with success, data, and error fields.

Error Handling: Errors return appropriate HTTP status codes with descriptive messages.