POST /api/auth/register
Creates a new user account with the user role. Rate limited to 5 requests per hour per IP address.
Request body
Unique username for the account. Must be 3–80 characters and contain only letters, numbers, underscores (_), and hyphens (-).
User’s email address. Must be a valid email format. Stored in lowercase.
Account password. Minimum 8 characters. Must contain at least one uppercase letter, one lowercase letter, and one digit.
Response
201 Created
Returns the newly created user object.
The registered email address.
Combined first and last name. Falls back to username if not provided.
Whether the account is active. true for newly registered users.
ISO 8601 timestamp of account creation.
ISO 8601 timestamp of the last update.
Role name. Always user for newly registered accounts.
Error responses
| Status | Description |
|---|
400 | Validation error — missing required fields, invalid username format, invalid email, or password does not meet requirements |
409 | Conflict — username or email already registered |
curl --request POST \
--url https://task-forge-gbd6h8gtg8hchve9.chilecentral-01.azurewebsites.net/api/auth/register \
--header 'Content-Type: application/json' \
--data '{
"username": "johndoe",
"email": "[email protected]",
"password": "SecurePass123",
"first_name": "John",
"last_name": "Doe"
}'
{
"success": true,
"message": "Usuario registrado con exito",
"data": {
"id": 42,
"username": "johndoe",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"is_active": true,
"created_at": "2026-03-17T10:00:00.000000",
"updated_at": "2026-03-17T10:00:00.000000",
"role": {
"id": 2,
"name": "user",
"description": "Standard user role"
}
}
}