curl --request POST \
--url https://api.example.com/api/users/signup \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"message": "<string>",
"token": "<string>",
"userId": 123,
"username": "<string>",
"error": "<string>"
}Register a new user account
curl --request POST \
--url https://api.example.com/api/users/signup \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"message": "<string>",
"token": "<string>",
"userId": 123,
"username": "<string>",
"error": "<string>"
}POST /api/users/signup
curl -X POST https://api.mediguide.com/api/users/signup \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe",
"email": "[email protected]",
"password": "securePassword123"
}'
{
"message": "Usuario registrado exitosamente",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"userId": 42,
"username": "johndoe"
}
{
"error": "Todos los campos son requeridos"
}
{
"error": "Usuario ya está registrado"
}
{
"error": "Correo ya está registrado"
}
{
"error": "Error interno del servidor"
}
src/routes/users.js:11