Skip to main content

Endpoint

POST /api/users/signup

Request Body

username
string
required
Unique username for the account. Must not already exist in the system.
email
string
required
User’s email address. Must not already be registered.
password
string
required
Account password for authentication.

Response

Success response (201 Created)
message
string
Confirmation message: “User registered successfully”
userId
integer
The unique ID assigned to the newly created user
username
string
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"
}

Build docs developers (and LLMs) love