POST /api/users/register 🔓 Public

Register a new user account

📋 Endpoint Details

Method: POST
Path: /api/users/register
Authentication: Not required

📤 Request Body

{ "username": "string (required)", "password": "string (required)", "profile": { "fullName": "string (optional)", "email": "string (optional)", "phone": "string (optional)", "city": "string (optional)", "state": "string (optional)" } }

📥 Response Example

{ "success": true, "message": "User registered successfully", "data": { "_id": "...", "username": "example_user", "registeredAt": "2024-01-01T00:00:00.000Z" } }

💡 Usage Tips

cURL Example:

curl -X POST \ http://localhost:3000/api/users/register \ -H "Content-Type: application/json" \ -d '{ "username": "string (required)", "password": "string (required)", "profile": { "fullName": "string (optional)", "email": "string (optional)", "phone": "string (optional)", "city": "string (optional)", "state": "string (optional)" } }'
← Back to Home