Endpoint
POST /api/users/signup
Request Body
Unique username for the account. Must not already exist in the system.
User’s email address. Must not already be registered.
Account password for authentication.
Response
Success response (201 Created)
Confirmation message: “User registered successfully”
The unique ID assigned to the newly created user
The username of the registered user
Example Request
curl -X POST https://api.mediguide.com/api/users/signup \
-H "Content-Type: application/json" \
-d '{
"username": "john_doe",
"email": "[email protected]",
"password": "securePassword123"
}'
Example Response
{
"message": "User registered successfully",
"userId": 42,
"username": "john_doe"
}
Error Responses
400 Bad Request - Username Already Exists
{
"error": "Usuario ya está registrado"
}
400 Bad Request - Email Already Exists
{
"error": "Correo ya está registrado"
}
500 Internal Server Error
{
"error": "Error message details"
}