📡 API Endpoints
Use these endpoints to interact with the user system from your frontend application,
mobile app, or any HTTP client like Postman.
POST
Register New User
URL: https://backend.clouvie.com/api/register
Request Body (JSON):
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}
Example using cURL:
curl -X POST https://backend.clouvie.com/api/register \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"john@example.com","password":"password123"}'
GET
Get All Users
URL: https://backend.clouvie.com/api/users
Example using cURL:
curl -X GET https://backend.clouvie.com/api/users
Example using JavaScript (Fetch API):
fetch('https://backend.clouvie.com/api/users')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
💡 Beginner Tips:
- Always send Content-Type: application/json header for POST requests
- Password must be at least 8 characters
- Email must be unique - you can't register the same email twice
- API returns JSON responses with 'success', 'message', and 'data' fields
- Use tools like Postman or Insomnia to test APIs easily